File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Auth Callback</ title >
6+ </ head >
7+ < body >
8+ < script >
9+ // Supabase will redirect here with the access_token/id_token in the URL hash
10+ // Example: https://your-webpage.com/callback#access_token=...&type=...&expires_in=...
11+
12+ const hash = window . location . hash . substr ( 1 ) ; // remove #
13+ const params = new URLSearchParams ( hash ) ;
14+ const accessToken = params . get ( 'access_token' ) ;
15+ const idToken = params . get ( 'id_token' ) ;
16+
17+ if ( accessToken ) {
18+ // Redirect to your app using deep link and pass the token
19+ window . location . href = myapp :/ / login - callback ?access_token = $ { accessToken} & id_token = $ { idToken} ;
20+ } else {
21+ document . body . innerHTML = "Login failed or cancelled." ;
22+ }
23+ </ script >
24+ </ body >
25+ </ html >
You can’t perform that action at this time.
0 commit comments