invalid client id gmgngngngngng ntm
This commit is contained in:
parent
d8a650bdd3
commit
c3e9ffcb6d
3 changed files with 92 additions and 16 deletions
|
|
@ -1,2 +1,20 @@
|
|||
// FIXME: This file should handle the auth redirection
|
||||
// Get the code from the URL parameters and redirect to the relevant page
|
||||
import * as auth from "../../../utils/auth"
|
||||
|
||||
let code;
|
||||
|
||||
try {
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
code = params.get("code")
|
||||
}
|
||||
catch {
|
||||
console.error("Unable to retrieve code")
|
||||
alert("Unable to retrieve code")
|
||||
}
|
||||
|
||||
if (! await auth.getToken(code)) {
|
||||
console.error("Unable to retrieve token")
|
||||
alert("Unable to retrieve token")
|
||||
}
|
||||
|
||||
console.debug("Redirecting...")
|
||||
window.location = import.meta.env.VITE_URL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue