-
Notifications
You must be signed in to change notification settings - Fork 50
CredentialsManager user info/ID token contents accessible via flutter SDK #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,111 @@ | |||
class UserIdentity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a User_Profile class defined . Please re use that
}); | ||
|
||
Future<bool> storeCredentials(final Credentials credentials); | ||
Future<UserInfo> getIDTokenContents(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be of nullable type ,in the scneario if the credentials aren't available and someone invokes this api ?
} | ||
|
||
/// Retrieves the credentials from the native storage. | ||
Future<UserInfo> getIDTokenContents(final CredentialsManagerRequest request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Credentials
class uses a user
property for this. Since this method here is exposing exactly the same functionality (parsing and returning the info contained in the ID token), we should stick to the same naming convention, otherwise it could be confusing. Using different names for the same thing may suggest these are actually different things, or that there is a substantive difference.
@@ -0,0 +1,16 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of symlinks missing. See https://github.com/auth0/auth0-flutter/actions/runs/15893748250/job/44821016570?pr=607

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add Dart tests and Swift tests.
- Dart: https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter_platform_interface/test/method_channel_credentials_manager_test.dart and https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/test/mobile/credentials_manager_test.dart
- Swift: https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/example/ios/Tests/CredentialsManager/CredentialsManagerHandlerTests.swift#L259-L262 and https://github.com/auth0/auth0-flutter/tree/main/auth0_flutter/example/ios/Tests/CredentialsManager (the new handler needs its own test file)
📋 Changes
This PR exposes api to access ID Token contents via Credentials Manager in flutter SDK
GH issue #378 will be addressed via this PR
📎 References
🎯 Testing