-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
418 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
override_platforms: | ||
firefox: | ||
settings: | ||
# Workaround for: https://github.com/dart-lang/test/issues/2194 | ||
executable: /Applications/Firefox.app/Contents/MacOS/firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
import 'package:celest_auth/src/client/auth_client_platform.vm.dart' | ||
if (dart.library.js_interop) 'package:celest_auth/src/client/auth_client_platform.web.dart'; | ||
import 'package:celest_core/celest_core.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
abstract base class AuthClient { | ||
factory AuthClient() = AuthClientPlatform; | ||
factory AuthClient({ | ||
required AuthProtocol protocol, | ||
}) = AuthClientPlatform; | ||
|
||
@protected | ||
AuthClient.base(); | ||
AuthClient.base({ | ||
required this.protocol, | ||
}); | ||
|
||
@protected | ||
final AuthProtocol protocol; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
packages/celest_auth/lib/src/client/auth_client_platform.web.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
import 'package:celest_auth/src/client/auth_client.dart'; | ||
import 'package:celest_auth/src/client/auth_client.web.dart'; | ||
import 'package:celest_core/celest_core.dart'; | ||
// ignore: implementation_imports | ||
import 'package:celest_core/src/util/globals.dart'; | ||
import 'package:meta/meta.dart'; | ||
import 'package:os_detect/os_detect.dart' as os; | ||
|
||
abstract base class AuthClientPlatform extends AuthClient { | ||
factory AuthClientPlatform() { | ||
factory AuthClientPlatform({ | ||
required AuthProtocol protocol, | ||
}) { | ||
if (kIsWeb) { | ||
return AuthClientWeb(); | ||
return AuthClientWeb(protocol: protocol); | ||
} | ||
throw UnsupportedError( | ||
'The current platform is not supported: ${os.operatingSystem}', | ||
); | ||
} | ||
|
||
@protected | ||
AuthClientPlatform.base() : super.base(); | ||
AuthClientPlatform.base({ | ||
required super.protocol, | ||
}) : super.base(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 11 additions & 4 deletions
15
packages/celest_auth/lib/src/client/passkeys/passkey_client.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
packages/celest_auth/lib/src/client/passkeys/passkey_client.darwin.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.