Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 #pin@v2.23.0
with:
flutter-version: 3.29.3
flutter-version: ${{ inputs.flutter }}
channel: stable
cache: true

Expand Down
39 changes: 5 additions & 34 deletions .github/actions/setup-darwin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ inputs:
description: Either iOS or macOS
required: true

ruby:
description: The version of Ruby to use
required: true

flutter:
description: The version of Flutter to use
required: true
Expand All @@ -30,49 +26,24 @@ runs:
using: composite

steps:
- name: Lowercase platform value
id: lowercase-platform
run: echo "platform=$(echo ${{ inputs.platform }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
shell: bash

- name: Set up Ruby
uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # pin@v1.300.0
with:
ruby-version: ${{ inputs.ruby }}
bundler-cache: true
cache-version: 1
working-directory: auth0_flutter/example/${{ steps.lowercase-platform.outputs.platform }}

- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # pin@v2.23.0
with:
flutter-version: ${{ inputs.flutter }}
channel: stable
cache: true

- name: Install Flutter dependencies
working-directory: auth0_flutter/example
run: flutter pub get
shell: bash

- name: Setup Xcode
run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode }}.app/Contents/Developer
shell: bash

- name: Save Xcode version
run: xcodebuild -version | tee .xcode-version
- name: Enable Swift Package Manager
run: flutter config --enable-swift-package-manager
shell: bash

- id: restore-pods-cache
name: Restore Pods cache
uses: actions/cache@v5
with:
path: auth0_flutter/example/${{ steps.lowercase-platform.outputs.platform }}/Pods
key: pods-${{ hashFiles('Podfile.lock') }}-${{ hashFiles('.xcode-version') }}-v1

- name: Install pods
working-directory: auth0_flutter/example/${{ steps.lowercase-platform.outputs.platform }}
run: pod install
- name: Install Flutter dependencies
working-directory: auth0_flutter/example
run: flutter pub get
shell: bash

- name: Set .env
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/setup-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ runs:
flutter-version: ${{ inputs.flutter }}
channel: stable
cache: true


- name: Enable Swift Package Manager
run: flutter config --enable-swift-package-manager
shell: bash
- name: Install Flutter dependencies
working-directory: ${{ inputs.working-directory }}
run: flutter pub get
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/unit-tests-darwin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:

- name: Run ${{ inputs.platform }} unit tests
working-directory: auth0_flutter/example/${{ steps.lowercase-platform.outputs.platform }}
run: xcodebuild test -scheme Runner -workspace Runner.xcworkspace -destination '${{ inputs.destination }}' -resultBundlePath unit-tests.xcresult -skip-testing:RunnerUITests
run: xcodebuild test -scheme Runner -project Runner.xcodeproj -destination '${{ inputs.destination }}' -resultBundlePath unit-tests.xcresult -skip-testing:RunnerUITests
shell: bash

- name: Upload xcresult bundles
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
ruby: '3.3.1'
flutter: '3.x'
ios-simulator: iPhone 16
java: 17
Expand Down Expand Up @@ -139,7 +138,6 @@ jobs:
uses: ./.github/actions/setup-darwin
with:
platform: ${{ env.platform }}
ruby: ${{ env.ruby }}
flutter: ${{ env.flutter }}
xcode: ${{ matrix.xcode }}
auth0-domain: ${{ vars.AUTH0_DOMAIN }}
Expand All @@ -151,15 +149,11 @@ jobs:
platform: ${{ env.platform }}
destination: ${{ format('{0}{1}', 'platform=iOS Simulator,name=', env.ios-simulator) }}

- name: Convert coverage report
working-directory: auth0_flutter/example/ios
run: bundle exec slather coverage -x --scheme Runner Runner.xcodeproj

- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: iOS coverage
path: auth0_flutter/example/ios/cobertura
path: auth0_flutter/example/ios/unit-tests.xcresult
# TODO: fix both android and iOS smoke testcases and uncomment them.
# test-ios-smoke:
# name: Run native iOS smoke tests using Xcode ${{ matrix.xcode }}
Expand Down Expand Up @@ -217,7 +211,6 @@ jobs:
uses: ./.github/actions/setup-darwin
with:
platform: ${{ env.platform }}
ruby: ${{ env.ruby }}
flutter: ${{ env.flutter }}
xcode: ${{ matrix.xcode }}
auth0-domain: ${{ vars.AUTH0_DOMAIN }}
Expand Down
5 changes: 5 additions & 0 deletions auth0_flutter/darwin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ Icon?
/Flutter/Generated.xcconfig
/Flutter/ephemeral/
/Flutter/flutter_export_environment.sh

# Swift Package Manager
.build/
.swiftpm/
FlutterFramework/
7 changes: 0 additions & 7 deletions auth0_flutter/darwin/Classes/Auth0FlutterPlugin.h

This file was deleted.

15 changes: 0 additions & 15 deletions auth0_flutter/darwin/Classes/Auth0FlutterPlugin.m

This file was deleted.

29 changes: 0 additions & 29 deletions auth0_flutter/darwin/auth0_flutter.podspec

This file was deleted.

32 changes: 32 additions & 0 deletions auth0_flutter/darwin/auth0_flutter/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions auth0_flutter/darwin/auth0_flutter/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "auth0_flutter",
platforms: [
.iOS("14.0"),
.macOS("11.0"),
],
products: [
.library(name: "auth0-flutter", targets: ["auth0_flutter"]),
],
dependencies: [
.package(url: "https://github.com/auth0/Auth0.swift", exact: "2.18.0"),
.package(url: "https://github.com/auth0/JWTDecode.swift", exact: "3.3.0"),
.package(url: "https://github.com/auth0/SimpleKeychain", exact: "1.3.0"),
],
targets: [
.target(
name: "auth0_flutter",
dependencies: [
.product(name: "Auth0", package: "Auth0.swift"),
.product(name: "JWTDecode", package: "JWTDecode.swift"),
.product(name: "SimpleKeychain", package: "SimpleKeychain"),
],
path: "Sources/auth0_flutter"
),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Flutter
import FlutterMacOS
#endif

public class SwiftAuth0FlutterPlugin: NSObject, FlutterPlugin {
public class Auth0FlutterPlugin: NSObject, FlutterPlugin {
static var handlers: [FlutterPlugin.Type] = [WebAuthHandler.self,
AuthAPIHandler.self,
DPoPHandler.self,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if os(iOS)
import UIKit

enum SafariViewControllerProperty: String, CaseIterable {
case presentationStyle
}
Expand Down
2 changes: 1 addition & 1 deletion auth0_flutter/example/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ AUTH0_CLIENT_ID=YOUR_AUTH0_CLIENT_ID
# settings page of your Auth0 application with the custom scheme value.
# 2. Update the scheme value in android/app/src/main/res/values/strings.xml
#
AUTH0_CUSTOM_SCHEME=YOUR_AUTH0_CUSTOM_SCHEME
AUTH0_CUSTOM_SCHEME=YOUR_AUTH0_CUSTOM_SCHEME
Loading
Loading