-
Notifications
You must be signed in to change notification settings - Fork 938
Implement getToken method for Regional Auth Interop #9061
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: gcip-byociam-web
Are you sure you want to change the base?
Conversation
|
Vertex AI Mock Responses Check
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
@@ -51,6 +52,27 @@ export class AuthInterop implements FirebaseAuthInternal { | |||
return { accessToken }; | |||
} | |||
|
|||
async getFirebaseToken(): Promise<{ accessToken: string } | null> { |
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 we use the existing getToken method instead of new? If we create new, then wouldn't the existing product logic have to make changes?
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.
In that case we would have to force that getToken method should have forceRefresh as false if regional auth is initialized.
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.
Yes, that would be the case as refreshToken is not supported. Alternatively we can log a warning message and ignore the field for now, but i would prefer throwing error as it makes it more clear.
@@ -85,11 +95,35 @@ export class AuthInterop implements FirebaseAuthInternal { | |||
); | |||
} | |||
|
|||
private assertRegionalAuthConfigured(): void { | |||
_assert(this.auth.tenantConfig, AuthErrorCode.OPERATION_NOT_ALLOWED); | |||
} |
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.
Is this required with new changes?
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.
Removed unused methods.
Discussion
Testing