-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[FirebaseAuth] Add Sign-Out Support for BYO-CIAM in Regionalized GCIP #15093
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
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback. |
Generated by 🚫 Danger |
exchangeTokenSignOut() for BYO-CIAMThere 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.
If the comment is not required please remove it, rest LGTM
Add R-GCIP Token-Only Sign Out
PR Description:
This PR introduces a new
signOut()behavior forAuthinstances when they are operating in a Regionalized GCIP (R-GCIP) token-only mode. Previously, thesignOut()method would attempt to clear a standard user session, which is not applicable when only an R-GCIP token is present.Key Changes:
R-GCIP Token-Only Sign Out:
Auth.signOut()method to correctly handle R-GCIP token-only sessions. If_currentUserisnil(indicating no standard user session) but an R-GCIP token exists,signOut()will now clear therGCIPFirebaseTokenLock(setting the token tonil) instead of attempting to clear a non-existent standard user session. This ensures that the R-GCIP token is properly invalidated on sign-out.exchangeTokenmethod no longer explicitly callssignOut()on a standard user session before updating the R-GCIP token, as the generalsignOut()method now handles both cases implicitly if a user is present.Auth Instance Management in Sample App (
AuthenticationExample):AppManagerin theAuthenticationExampleto better manageAuthinstances, particularly for regionalized Auth.Authinstances (defaultAppAuth,otherAppAuth,regionalAuthInstance) to avoid repeated creation.auth()method inAppManagernow consistently returns theregionalAuthInstancefor regionalized operations, ensuring the correct Auth configuration is always used.standardAuth()method to retrieve standard Auth instances (default or other app) for non-regionalized operations.Sample App Changes:
AuthMenuoption:exchangeTokenSignOut.callExchangeTokenSignOut()inAuthViewControllerto demonstrate the new R-GCIP token-only sign-out functionality. This allows users to explicitly sign out a regionalized session that only has an R-GCIP token.