-
Notifications
You must be signed in to change notification settings - Fork 927
Include a reference to AuthInternal in MultiFactorSessionImpl. #6594
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
🦋 Changeset detectedLatest commit: ec9be42 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This is needed for TOTP support where the function to generate TOTP Secret (by invoking startEnrollment API) needs the Auth reference, but rather than pass in a parameter, we can derive it from the multiFactorSession that is already passed in as a param. This simplifies the API for the developer, by requiring one less paramter.
0f84366
to
4cc1e49
Compare
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
@@ -31,11 +32,19 @@ interface SerializedMultiFactorSession { | |||
export class MultiFactorSessionImpl implements MultiFactorSession { | |||
private constructor( | |||
readonly type: MultiFactorSessionType, | |||
readonly credential: string | |||
readonly credential: string, | |||
readonly auth?: AuthInternal |
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.
Wondering if this change need to be documented somewhere or any proto files need to be changed as we added a new param
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.
This is an implementation detail, a developer will not directly interact with this field, hence it is not documented.
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.
What about internal customers?
* Include a reference to AuthInternal in MultiFactorSessionImpl. This is needed for TOTP support where the function to generate TOTP Secret (by invoking startEnrollment API) needs the Auth reference, but rather than pass in a parameter, we can derive it from the multiFactorSession that is already passed in as a param. This simplifies the API for the developer, by requiring one less paramter. * Added changeset.
This is needed for TOTP support where the function to generate TOTP Secret (by invoking startEnrollment API) needs the Auth reference, but rather than pass in a parameter, we can derive it from the multiFactorSession that is already passed in as a param. This simplifies the TOTP enrollment API for the developer, by requiring one less parameter.
The usage for auth can be seen in this WIP change - mfa-totp...mfa-totp-prameshj#diff-e9ae122839df9e758f95dd35db60444dd51b73a319b02a9ef36b747dc9889fbaR81
Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:
Discussion
If not, go file an issue about this before creating a pull request to discuss.
Testing
Added new unit tests.