You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clientId: 'com.aboutyou.dart_packages.sign_in_with_apple.example', // example clientId
130
-
redirectUri: Uri.parse(
131
-
'https://flutter-sign-in-with-apple-example.glitch.me/callbacks/sign_in_with_apple', // example redirectUri
132
-
),
133
-
),
134
-
),
135
129
),
136
130
child: MaterialApp(
137
131
title: 'Material App',
@@ -242,15 +236,51 @@ context.getSignedInUser()
242
236
## Authentication Providers
243
237
For the time being, Lit Firebase auth will only directly provide Google and Apple sign in.
244
238
245
-
**NOTE:** Apple requires Apple sign in to be a sign-in option if any other third-party sign-in option is used.
239
+
**NOTE:** Apple requires Apple sign in to be enalbed if any other third-party sign-in option is used.
240
+
241
+
The supported third-party providers are:
242
+
* Google
243
+
* Apple
244
+
* Github
245
+
* Twitter
246
+
247
+
These need to be enabled in the `LitAuthInit` widget.
248
+
```dart
249
+
LitAuthInit(
250
+
// specify which auth providers to enable
251
+
authProviders: AuthProviders(
252
+
emailAndPassword: true, // enabled by default
253
+
google: true,
254
+
apple: true,
255
+
twitter: true,
256
+
github: true,
257
+
anonymous: true,
258
+
),
259
+
child: MaterialApp(
260
+
title: 'Material App',
261
+
home: Home(),
262
+
),
263
+
);
264
+
```
265
+
266
+
To initiate authentication with one of these providers, call the relevant method. For example:
246
267
247
-
Other identity providers (Facebook, Github, etc.) will need to be implemented seperately. After successful third party sign in, you can sign in to Firebase by making use of the `signInWithCredential` method available on `BuildContext`.
268
+
```dart
269
+
FlatButton(
270
+
onPressed: () {
271
+
context.signInWithGithub();
272
+
},
273
+
child: Text('Github Sign In'),
274
+
),
275
+
```
276
+
277
+
Other identity providers (for example, Facebook) will need to be implemented seperately. After successful third party sign in you can sign in to Firebase by making use of the `signInWithCredential` method available on `BuildContext`.
248
278
249
279
For example:
250
280
251
281
```dart
252
282
Widget build(BuildContext context) {
253
-
AuthCredential credential = // get credential for identity provider (Facebook, Github, etc.)
283
+
AuthCredential credential = // get credential for identity provider (Facebook, etc.)
0 commit comments