Skip to content

Commit 0e5697a

Browse files
committed
Make the Facebook ID token available in addition to the access token.
1 parent 1ffbd9d commit 0e5697a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

FirebaseFacebookAuthUI/Sources/FUIFacebookAuth.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ - (nullable NSString *)providerID {
136136
return FIRFacebookAuthProviderID;
137137
}
138138

139+
/** @fn accessToken:
140+
@brief The access token provided by Facebook's login flow.
141+
*/
139142
- (nullable NSString *)accessToken {
140143
if (self.authUI.isEmulatorEnabled) {
141144
return nil;
@@ -144,10 +147,13 @@ - (nullable NSString *)accessToken {
144147
}
145148

146149
/** @fn idToken:
147-
@brief Facebook doesn't provide User Id Token during sign in flow
150+
@brief The ID token provided by Facebook's login flow.
148151
*/
149152
- (nullable NSString *)idToken {
150-
return nil;
153+
if (self.authUI.isEmulatorEnabled) {
154+
return nil;
155+
}
156+
return FBSDKAuthenticationToken.currentAuthenticationToken.tokenString;
151157
}
152158

153159
- (NSString *)shortName {

0 commit comments

Comments
 (0)