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
Inside the `SupabaseClient` instance created before, you can find an `auth` property of type `GoTrueClient`. You can use it to perform sign in and sign up requests.
45
39
46
-
Here's how to Sign Up with Email and get the signed in users Session Info.
40
+
-Here's how to sign up with an email and password and get the signed in user `Session` info:
We need to first setup the callback URL for all Social Logins inside the app.
72
+
We need to first set up the callback URL for all Social Logins inside the app.
73
+
74
+
- Setup the callback `URL` on `Info.plist`:
79
75
80
-
- Setup the callback URL on Info.plist
81
76
```xml
82
77
<array>
83
78
<dict>
@@ -90,21 +85,23 @@ We need to first setup the callback URL for all Social Logins inside the app.
90
85
</dict>
91
86
</array>
92
87
```
93
-
- Add this callback URL on Supabase under Authentication -> URL Configuration -> Redirect URLs
88
+
89
+
- Add this callback `URL` on `Supabase` under `Authentication -> URL Configuration -> Redirect URLs`.
94
90
95
91
### Google Sign In
96
92
97
-
- Setup Google Auth as per [Supabase's Documentation](https://supabase.com/docs/guides/auth/social-login/auth-google)
98
-
- Note: For iOS we still need to use Google Consent Form for Web
99
-
- Import SafariServices to your ViewController and create a SafariVC instance
93
+
- Setup Google Auth as per [Supabase's Documentation](https://supabase.com/docs/guides/auth/social-login/auth-google).
94
+
- Note: For iOS we still need to use Google Consent Form for Web.
95
+
- Import `SafariServices` in your `ViewController` and create a `SFSafariViewController` instance:
100
96
101
97
```swift
102
98
importSafariServices
103
99
104
100
var safariVC: SFSafariViewController?
105
101
```
106
-
- Get the URL for Google Sign in from Supabase and load it on SFSafariViewController
107
-
- Add the previous callback URL you set up in the redirecTo
102
+
103
+
- Get the `URL` for Google Sign in from `Supabase` and load it on `SFSafariViewController`.
104
+
- Pass the previous callback `URL` you set up in the `redirecTo` parameter:
108
105
109
106
```swift
110
107
Task {
@@ -117,8 +114,10 @@ Task {
117
114
}
118
115
}
119
116
```
120
-
- Handle the callback URL on SceneDelegate. (For older projects you can use AppDelegate if SceneDelegate is not there in the project)
121
-
- Post NotificationCenter call to let the View Controller know that callback has been received and pass the URL received. This URL will be used to get the session for the user
117
+
118
+
- Handle the callback `URL` on `SceneDelegate` (for older projects, you can use `AppDelegate` if `SceneDelegate` is not present).
119
+
- Post a `NotificationCenter` call to let the `ViewController` know the callback has been fired and pass the `URL` received. This `URL` will be used to get the user session.
- Setup Apple Auth as per [Supabase's Documentation](https://supabase.com/docs/guides/auth/social-login/auth-apple)
157
-
- For Sign in with Apple follow the above as per Google Sign In and just replace the provider
158
-
- Once the user moves to the SFSafariViewController the Apple Native Popup will slide up to continue with Sign In.
157
+
- Setup Apple Auth as per [Supabase's Documentation](https://supabase.com/docs/guides/auth/social-login/auth-apple).
158
+
- For Sign in with Apple follow the above as per Google Sign In and just replace the provider.
159
+
- Once the user moves to the `SFSafariViewController`, an Apple native pop-up will slide up to continue with the sign in.
159
160
160
161
```swift
161
162
Task {
@@ -171,19 +172,15 @@ Task {
171
172
172
173
### Other Social Logins
173
174
174
-
-Other Social Logins if using a webview will be similar to above and just follow the [Supabase's Documentation](https://supabase.com/docs/guides/auth/) for their setup
175
+
-If using a WebViews, other social logins will be similar to above. Just follow the [Supabase's Documentation](https://supabase.com/docs/guides/auth/) for their setup.
0 commit comments