Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
62e4fb6
Add api addtion for SIWA and add Function for Unit test
aiwenisevan Aug 3, 2022
47fd1b5
Adding Unit test for apple signIn flow in FIROAuthProviderTests and F…
aiwenisevan Aug 4, 2022
8578f96
remove AuthSample.xcodeproj fiels and application.plist file under Sa…
aiwenisevan Aug 9, 2022
8ca23e4
Revert "remove AuthSample.xcodeproj fiels and application.plist file …
aiwenisevan Aug 9, 2022
8c53928
remove changes in AuthSample 1/5
aiwenisevan Aug 9, 2022
32723a4
remove changes in AuthSample 2/5
aiwenisevan Aug 9, 2022
ecea19e
remove changes in AuthSample 3/5
aiwenisevan Aug 9, 2022
b004ef5
remove changes in AuthSample 4/5
aiwenisevan Aug 9, 2022
e1450ea
remove changes in AuthSample 5/5
aiwenisevan Aug 9, 2022
1b890f4
overwrite with master firles to remove white space changes in the two…
aiwenisevan Aug 9, 2022
9e4c88e
Delete Application.plist file
aiwenisevan Aug 9, 2022
66f2db7
Clean extra methods in FIROAuthCredentialInternal and related files t…
aiwenisevan Aug 9, 2022
f2853ae
Add displayName in FIRVerifyAssertionRequest
aiwenisevan Aug 10, 2022
a26395d
Fix issues in comments, merge GoogleAuthprovider, fix files in tests
aiwenisevan Aug 12, 2022
2dac690
Merge branch 'master' into apiAdditionforSIWA
aiwenisevan Aug 12, 2022
f640537
fix issues
aiwenisevan Aug 12, 2022
1d8d3c8
Clang-format all files
aiwenisevan Aug 12, 2022
c3389c6
Adding comment for testSignInWithCredentialSuccess
aiwenisevan Aug 12, 2022
cfe6f4e
Adding comments for testSignInWithCredentialSuccess
aiwenisevan Aug 12, 2022
d38c34e
Merge branch 'master' into apiAdditionforSIWA
rosalyntan Feb 16, 2023
3dcc540
Updates to reflect approved API.
rosalyntan Feb 16, 2023
9c54381
Address review comments.
rosalyntan Feb 21, 2023
b7d0afe
Update unit tests.
rosalyntan Feb 21, 2023
05a9c50
Update changelog.
rosalyntan Mar 3, 2023
b062ec1
Remove JSON pretty-print and add one more unit test.
rosalyntan Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#Firebase AuthSample files
FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/
FirebaseAuth/Tests/Sample/Application.plist

FirebaseAuth/Tests/Sample/Sample/Application.plist
FirebaseAuth/Tests/Sample/Sample/AuthCredentials.h
FirebaseAuth/Tests/Sample/Sample/GoogleService-Info_multi.plist
Expand All @@ -20,6 +24,7 @@ FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist
FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist
# FirebaseMessaging test app GoogleService-Info.plist
FirebaseMessaging/Apps/Shared/GoogleService-Info.plist

FirebaseMessaging/Apps/AdvancedSample/SampleWatchWatchKitExtension/GoogleService-Info.plist
FirebaseMessaging/Apps/AdvancedSample/AppClips/GoogleService-Info.plist

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7
3.1.2
20 changes: 20 additions & 0 deletions FirebaseAuth/Sources/AuthProvider/OAuth/FIROAuthCredential.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ - (instancetype)initWithProviderID:(NSString *)providerID
return self;
}

- (instancetype)initWithProviderID:(NSString *)providerID
IDToken:(nullable NSString *)IDToken
rawNonce:(nullable NSString *)rawNonce
accessToken:(nullable NSString *)accessToken
secret:(nullable NSString *)secret
displayName:(nullable NSString *)displayName
pendingToken:(nullable NSString *)pendingToken {
self = [super initWithProvider:providerID];
if (self) {
_IDToken = IDToken;
_rawNonce = rawNonce;
_accessToken = accessToken;
_pendingToken = pendingToken;
_secret = secret;
_displayName = displayName;
}
return self;
}

- (instancetype)initWithProviderID:(NSString *)providerID
sessionID:(NSString *)sessionID
OAuthResponseURLString:(NSString *)OAuthResponseURLString {
Expand Down Expand Up @@ -94,6 +113,7 @@ - (void)prepareVerifyAssertionRequest:(FIRVerifyAssertionRequest *)request {
request.sessionID = _sessionID;
request.providerOAuthTokenSecret = _secret;
request.pendingToken = _pendingToken;
request.displayName = _displayName;
}

#pragma mark - NSSecureCoding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ NS_ASSUME_NONNULL_BEGIN
secret:(nullable NSString *)secret
pendingToken:(nullable NSString *)pendingToken NS_DESIGNATED_INITIALIZER;

- (instancetype)initWithProviderID:(NSString *)providerID
IDToken:(nullable NSString *)IDToken
rawNonce:(nullable NSString *)rawNonce
accessToken:(nullable NSString *)accessToken
secret:(nullable NSString *)secret
displayName:(nullable NSString *)displayName
pendingToken:(nullable NSString *)pendingToken NS_DESIGNATED_INITIALIZER;

/** @fn initWithProviderId:sessionID:OAuthResponseURLString:
@brief Intitializer which takes a sessionID and an OAuthResponseURLString.
@param providerID The provider ID associated with the credential being created.
Expand Down
14 changes: 14 additions & 0 deletions FirebaseAuth/Sources/AuthProvider/OAuth/FIROAuthProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ + (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
pendingToken:nil];
}

+ (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
IDToken:(NSString *)IDToken
rawNonce:(nullable NSString *)rawNonce
accessToken:(nullable NSString *)accessToken
displayName:(nonnull NSString *)displayName{
return [[FIROAuthCredential alloc] initWithProviderID:providerID
IDToken:IDToken
rawNonce:rawNonce
accessToken:accessToken
secret:nil
displayName:displayName
pendingToken:nil];
}

+ (instancetype)providerWithProviderID:(NSString *)providerID {
return [[self alloc] initWithProviderID:providerID auth:[FIRAuth auth]];
}
Expand Down
5 changes: 5 additions & 0 deletions FirebaseAuth/Sources/Backend/RPC/FIRVerifyAssertionRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, assign) BOOL autoCreate;

/** @property displayName
@brief A displayName linked to its provider
*/
@property(nonatomic, copy, nullable) NSString *displayName;

/** @fn initWithEndpoint:requestConfiguration:
@brief Please use initWithProviderID:requestConfifuration instead.
*/
Expand Down
5 changes: 5 additions & 0 deletions FirebaseAuth/Sources/Public/FirebaseAuth/FIROAuthCredential.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ NS_SWIFT_NAME(OAuthCredential)
*/
@property(nonatomic, readonly, nullable) NSString *secret;

/** @property displayName
@brief The displayName associated with this credential.
*/
@property(nonatomic, readonly, nullable) NSString *displayName;

/** @fn init
@brief This class is not supposed to be instantiated directly.
*/
Expand Down
17 changes: 17 additions & 0 deletions FirebaseAuth/Sources/Public/FirebaseAuth/FIROAuthProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@ NS_SWIFT_NAME(OAuthProvider)
+ (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
IDToken:(NSString *)IDToken
rawNonce:(nullable NSString *)rawNonce;
/** @fn credentialWithProviderID:IDToken:rawNonce:accessToken:
@brief Creates an `AuthCredential` for that OAuth 2 provider identified by provider ID, ID
token, raw nonce, and access token.

@param providerID The provider ID associated with the Auth credential being created.
@param IDToken The IDToken associated with the Auth credential being created.
@param rawNonce The raw nonce associated with the Auth credential being created.
@param accessToken The access token associated with the Auth credential be created, if
available.
@param displayName The displayName associated with the Auth credential being created.
@return A `AuthCredential` for the specified provider ID, ID token and access token.
*/
+ (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
IDToken:(NSString *)IDToken
rawNonce:(nullable NSString *)rawNonce
accessToken:(nullable NSString *)accessToken
displayName:(NSString *)displayName;

/** @fn init
@brief This class is not meant to be initialized.
Expand Down
Loading