@@ -144,14 +144,8 @@ class FacebookAuthProvider {
144
144
static Credential GetCredential (const char * access_token);
145
145
146
146
#ifdef INTERNAL_EXPERIMENTAL
147
- // / Return the providerId used for FederatedAuth.
148
- // /
149
- // / @return A string representation of the FacebookAuthProvider.
150
- // / @see FederatedAuthProvider::SetProviderData
151
- // / @see Auth::SignInWithProvider
152
- // / @see User::ReauthenticateWithProvider
153
- // / @see User::LinkWithProvider
154
- static const char * GetProviderId () { return " facebook.com" ; }
147
+ // / The provider id string used for FederatedAuth.
148
+ static constexpr const char * const kProviderId = " facebook.com" ;
155
149
#endif // INTERNAL_EXPERIMENTAL
156
150
};
157
151
@@ -166,14 +160,8 @@ class GitHubAuthProvider {
166
160
static Credential GetCredential (const char * token);
167
161
168
162
#ifdef INTERNAL_EXPERIMENTAL
169
- // / Return the providerId used for FederatedAuth.
170
- // /
171
- // / @return A string representation of the FacebookAuthProvider.
172
- // / @see FederatedAuthProvider::SetProviderData
173
- // / @see Auth::SignInWithProvider
174
- // / @see User::ReauthenticateWithProvider
175
- // / @see User::LinkWithProvider
176
- static const char * GetProviderId () { return " github.com" ; }
163
+ // / The provider id string used for FederatedAuth.
164
+ constexpr static const char * const kProviderId = " github.com" ;
177
165
#endif // INTERNAL_EXPERIMENTAL
178
166
};
179
167
@@ -190,14 +178,8 @@ class GoogleAuthProvider {
190
178
const char * access_token);
191
179
192
180
#ifdef INTERNAL_EXPERIMENTAL
193
- // / Return the providerId used for FederatedAuth.
194
- // /
195
- // / @return A string representation of the FacebookAuthProvider.
196
- // / @see FederatedAuthProvider::SetProviderData
197
- // / @see Auth::SignInWithProvider
198
- // / @see User::ReauthenticateWithProvider
199
- // / @see User::LinkWithProvider
200
- static const char * GetProviderId () { return " google.com" ; }
181
+ // / The provider id string used for FederatedAuth.
182
+ constexpr static const char * const kProviderId = " google.com" ;
201
183
#endif // INTERNAL_EXPERIMENTAL
202
184
};
203
185
@@ -212,14 +194,8 @@ class PlayGamesAuthProvider {
212
194
static Credential GetCredential (const char * server_auth_code);
213
195
214
196
#ifdef INTERNAL_EXPERIMENTAL
215
- // / Return the providerId used for FederatedAuth.
216
- // /
217
- // / @return A string representation of the FacebookAuthProvider.
218
- // / @see FederatedAuthProvider::SetProviderData
219
- // / @see Auth::SignInWithProvider
220
- // / @see User::ReauthenticateWithProvider
221
- // / @see User::LinkWithProvider
222
- static const char * GetProviderId () { return " playgames.google.com" ; }
197
+ // / The provider id string used for FederatedAuth.
198
+ constexpr static const char * const kProviderId = " playgames.google.com" ;
223
199
#endif // INTERNAL_EXPERIMENTAL
224
200
};
225
201
@@ -235,17 +211,29 @@ class TwitterAuthProvider {
235
211
static Credential GetCredential (const char * token, const char * secret);
236
212
237
213
#ifdef INTERNAL_EXPERIMENTAL
238
- // / Return the providerId used for FederatedAuth.
239
- // /
240
- // / @return A string representation of the FacebookAuthProvider.
241
- // / @see FederatedAuthProvider::SetProviderData
242
- // / @see Auth::SignInWithProvider
243
- // / @see User::ReauthenticateWithProvider
244
- // / @see User::LinkWithProvider
245
- static const char * GetProviderId () { return " twitter.com" ; }
214
+ // / The provider id string used for FederatedAuth.
215
+ constexpr static const char * const kProviderId = " twitter.com" ;
246
216
#endif // INTERNAL_EXPERIMENTAL
247
217
};
248
218
219
+
220
+ #ifdef INTERNAL_EXPERIMENTAL
221
+ // / @brief Use an access token provided by Yahoo to authenticate.
222
+ class YahooAuthProvider {
223
+ public:
224
+ // / The provider id string used for FederatedAuth.
225
+ constexpr static const char * const kProviderId = " yahoo.com" ;
226
+ };
227
+
228
+ // / @brief Use an access token provided by Microsoft to authenticate.
229
+ class MicrosoftAuthProvider {
230
+ public:
231
+ // / The provider id string used for FederatedAuth.
232
+ constexpr static const char * const kProviderId = " microsoft.com" ;
233
+ };
234
+ #endif // INTERNAL_EXPERIMENTAL
235
+
236
+
249
237
// / @brief OAuth2.0+UserInfo auth provider (OIDC compliant and non-compliant).
250
238
class OAuthProvider {
251
239
public:
0 commit comments