Skip to content

Comments

CredentialsManager user info/ID token contents accessible via flutter SDK#607

Merged
pmathew92 merged 49 commits intomainfrom
SDK-6070
Feb 3, 2026
Merged

CredentialsManager user info/ID token contents accessible via flutter SDK#607
pmathew92 merged 49 commits intomainfrom
SDK-6070

Conversation

@NandanPrabhu
Copy link
Contributor

@NandanPrabhu NandanPrabhu commented Jun 26, 2025

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 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

(cherry picked from commit 1cb05d8)
@@ -0,0 +1,111 @@
class UserIdentity {
Copy link
Contributor

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();
Copy link
Contributor

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) {
Copy link
Contributor

@Widcket Widcket Jun 26, 2025

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 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Widcket Widcket left a comment

Copy link
Contributor

@sanchitmehtagit sanchitmehtagit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NandanPrabhu Let’s resolve the open comments, then we can test and merge this to close the GH issue

dependabot bot added 8 commits February 2, 2026 10:13
…/actions/setup-darwin (#709)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/actions/setup-darwin (#710)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/actions/setup-darwin (#713)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/actions/setup-darwin (#716)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/actions/setup-darwin (#719)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.281.0 to 1.282.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](ruby/setup-ruby@675dd7b...4fc31e1)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.282.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…/actions/setup-darwin (#722)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/actions/setup-darwin (#725)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


class GetCredentialsUserInfoRequestHandler: CredentialsManagerRequestHandler {
override val method: String = "credentialsManager#user"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update the example doc please ignore if already done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have updated the Examples.md file

Copy link
Contributor

@sanchitmehtagit sanchitmehtagit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NandanPrabhu
Copy link
Contributor Author

NandanPrabhu commented Feb 3, 2026

PR looks good. but just wanted to confirm if user property when converting between native dictionary to dart dictionary we are able to get all the values correctly @pmathew92

@pmathew92
Copy link
Contributor

pmathew92 commented Feb 3, 2026

@NandanPrabhu Yes, I tried some properties and I was able to fetch them like

      profile.email
      profile.isEmailVerified 
      profile.nickname
      profile.pictureUrl

@NandanPrabhu
Copy link
Contributor Author

@NandanPrabhu Yes, I tried some properties and I was able to fetch them like

      profile.email
      profile.isEmailVerified 
      profile.nickname
      profile.pictureUrl

@pmathew92 this is for both the platforms right?

@pmathew92
Copy link
Contributor

@pmathew92 this is for both the platforms right?
@NandanPrabhu Yes

@pmathew92 pmathew92 merged commit 29d0690 into main Feb 3, 2026
11 checks passed
@pmathew92 pmathew92 deleted the SDK-6070 branch February 3, 2026 10:15
NandanPrabhu added a commit that referenced this pull request Feb 4, 2026
* main: (22 commits)
  build(deps): bump ruby/setup-ruby from 1.286.0 to 1.288.0 in /.github/actions/setup-darwin (#740)
  CredentialsManager user info/ID token contents accessible via flutter SDK (#607)
  CI cleanup
  Avoid running always failing smoke tests for iOS
  make PR runs  with release workflow that triggers flutter analyze
  udpate pubspec
  udpate podspecs
  Release af-v2.0.0-beta.2
  pubspec update for beta release
  Release afpi-v2.0.0-beta.2
  fix flutter analyse errors
  build(deps): bump ruby/setup-ruby from 1.285.0 to 1.286.0 in /.github/actions/setup-darwin (#728)
  build(deps-dev): bump lodash from 4.17.21 to 4.17.23 in /appium-test (#729)
  chore:Fixed errors from flutter analyze (#727)
  feat: Add allowedBrowsers parameter to logout API [SDK-724] (#726)
  build(deps): bump ruby/setup-ruby from 1.283.0 to 1.285.0 in /.github/actions/setup-darwin (#725)
  address feedback
  refactor
  fix test cases and code refactoring
  fixed test cases
  ...
NandanPrabhu added a commit that referenced this pull request Feb 23, 2026
* main: (79 commits)
  build(deps): bump aws-actions/configure-aws-credentials from 5.1.1 to 6.0.0 in /.github/actions/rl-scanner (#744)
  chore:  updated the RL wrapper installation path (#746)
  Release af-v2.0.0-beta.3 (#743)
  Release afpi-v2.0.0-beta.3 (#742)
  Release afpi-v2.0.0-beta.3 (#741)
  build(deps): bump ruby/setup-ruby from 1.286.0 to 1.288.0 in /.github/actions/setup-darwin (#740)
  CredentialsManager user info/ID token contents accessible via flutter SDK (#607)
  CI cleanup
  Avoid running always failing smoke tests for iOS
  make PR runs  with release workflow that triggers flutter analyze
  udpate pubspec
  udpate podspecs
  Release af-v2.0.0-beta.2
  pubspec update for beta release
  Release afpi-v2.0.0-beta.2
  fix flutter analyse errors
  build(deps): bump ruby/setup-ruby from 1.285.0 to 1.286.0 in /.github/actions/setup-darwin (#728)
  build(deps-dev): bump lodash from 4.17.21 to 4.17.23 in /appium-test (#729)
  chore:Fixed errors from flutter analyze (#727)
  feat: Add allowedBrowsers parameter to logout API [SDK-724] (#726)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants