-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Firebase Auth TOTP support #11261
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
Merged
Merged
Firebase Auth TOTP support #11261
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9fdf7e1
[ SignIn#1]Adding sign-in related public header files for TOTP suppor…
Xiaoshouzi-gh 2ceb2e3
[ SignIn#2]Update Finalize MFA Sign In request to accommodates TOTP r…
Xiaoshouzi-gh 978f6d7
Totp enrollment (#11114)
pragatimodi b8c33e1
Added TOTP MFA Assertion logics (#11380)
Xiaoshouzi-gh 32defce
url-fix: adding hashing algorithm and remove log (#11383)
pragatimodi 88e121e
add totp sign in example to sample app (#11384)
Xiaoshouzi-gh db89233
Withdraw mfa (#11388)
pragatimodi 0db2d0f
provide missing TOTP factor type of error in the error code (#11392)
Xiaoshouzi-gh 10709b2
updated invalid verification code error msg (#11395)
Xiaoshouzi-gh a152bf7
Add unit tests (#11399)
pragatimodi 3d546cb
Changes to umbrella and changelog (#11450)
pragatimodi 47f33e1
Adding swift API header and updating NSLog to FIRLog
Xiaoshouzi-gh 69ee1da
Addressing mfaEnrollmentInfo logic feedback in all occurance
Xiaoshouzi-gh cdbd9ea
update log error code
Xiaoshouzi-gh e9892b2
Apply TW suggestions from code review
Xiaoshouzi-gh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Totp enrollment (#11114)
TOTP Enrollment Flow
- Loading branch information
commit 978f6d73cde4fee5c8221863d7667f3d515ca504
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...aseAuth/Sources/Backend/RPC/Proto/TOTP/FIRAuthProtoFinalizeMFATOTPEnrollmentRequestInfo.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "FirebaseAuth/Sources/Backend/RPC/Proto/FIRAuthProto.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FIRAuthProtoFinalizeMFATOTPEnrollmentRequestInfo : NSObject <FIRAuthProto> | ||
|
||
@property(nonatomic, copy, readonly, nonnull) NSString *sessionInfo; | ||
@property(nonatomic, copy, readonly, nonnull) NSString *verificationCode; | ||
|
||
- (instancetype)initWithSessionInfo:(NSString *)sessionInfo | ||
verificationCode:(NSString *)verificationCode; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
46 changes: 46 additions & 0 deletions
46
...aseAuth/Sources/Backend/RPC/Proto/TOTP/FIRAuthProtoFinalizeMFATOTPEnrollmentRequestInfo.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "FirebaseAuth/Sources/Backend/RPC/Proto/TOTP/FIRAuthProtoFinalizeMFATOTPEnrollmentRequestInfo.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@implementation FIRAuthProtoFinalizeMFATOTPEnrollmentRequestInfo | ||
|
||
- (instancetype)initWithSessionInfo:(NSString *)sessionInfo | ||
verificationCode:(NSString *)verificationCode { | ||
self = [super init]; | ||
if (self) { | ||
_sessionInfo = sessionInfo; | ||
_verificationCode = verificationCode; | ||
} | ||
return self; | ||
} | ||
|
||
- (NSDictionary *)dictionary { | ||
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; | ||
if (_sessionInfo) { | ||
dict[@"sessionInfo"] = _sessionInfo; | ||
} | ||
if (_verificationCode) { | ||
dict[@"verificationCode"] = _verificationCode; | ||
} | ||
return [dict copy]; | ||
} | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
25 changes: 25 additions & 0 deletions
25
...seAuth/Sources/Backend/RPC/Proto/TOTP/FIRAuthProtoFinalizeMFATOTPEnrollmentResponseInfo.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "FirebaseAuth/Sources/Backend/RPC/Proto/FIRAuthProto.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FIRAuthProtoFinalizeMFATOTPEnrollmentResponseInfo : NSObject <FIRAuthProto> | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.