Repository navigation
Commit 7f09488
fix: use SDK PKCE flow for Google sign-in (no fallback URL)
The previous Promise.race between signInWithOAuth and a 1200ms timeout
could time-out under any kind of network blip and fall back to a
hand-built OAuth URL via buildGoogleOAuthUrl. That fallback URL does
not include the PKCE code_verifier that the SDK stores in localStorage
when it returns its own URL — so when Google called back to /app, the
SDK could not complete the code-for-token exchange and the user was
stuck on "Redirecting…" until they refreshed and tried again.
Now we always use the SDK URL. If the SDK fails outright we surface a
clean error instead of silently degrading to a broken flow.
Ported from Part 5 commit 1e29930 with no dependency on the Capacitor
native helpers or edge-function-error wrapper.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 137bf53 commit 7f09488
1 file changed
Lines changed: 24 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
0 commit comments