We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54e716b commit 509e52aCopy full SHA for 509e52a
src/app/(landing)/oauth-callback/apple/page.tsx
@@ -25,9 +25,15 @@ function OAuthProcessCallback() {
25
if (fragment) {
26
const params = new URLSearchParams(fragment.slice(1)) // Remove the "#" and parse parameters
27
const token = params.get("id_token")
28
- if (token) {
29
- setStoredToken(token) // Store token if available
+ if (!token) {
+ const msg = "Invalid redirect parameters"
30
+ router.push(`/?error=${encodeURIComponent(msg)}`)
31
+ return
32
}
33
+ setStoredToken(token) // Store token if available
34
+ } else {
35
36
37
38
}, [searchParams])
39
0 commit comments