Merge branch 'auth_stuff' into dev_environment
This commit is contained in:
commit
b4877038f1
3 changed files with 23 additions and 20 deletions
|
|
@ -15,7 +15,8 @@ export default function AuthWrapper(props: Props) {
|
|||
useEffect(() => {
|
||||
const url = new URL(window.location.href);
|
||||
|
||||
const isManualLoginPage = url.pathname === "/login";
|
||||
const isManualLoginPage = url.pathname.includes("/login");
|
||||
console.log(url.pathname)
|
||||
console.log(isManualLoginPage)
|
||||
|
||||
if (isManualLoginPage) {
|
||||
|
|
@ -26,12 +27,13 @@ export default function AuthWrapper(props: Props) {
|
|||
let parsed = queryString.parse(url.search);
|
||||
if (parsed.signup === "true") {
|
||||
options.authorizationParams!.screen_hint = "signup";
|
||||
options.authorizationParams!.prompt = "login";
|
||||
}
|
||||
|
||||
if (parsed.email && parsed.email !== "") {
|
||||
options.authorizationParams!.login_hint = parsed.email.toString(); // prefill email
|
||||
}
|
||||
console.log(options)
|
||||
console.log(options.authorizationParams)
|
||||
loginWithRedirect(options)
|
||||
|
||||
} else if (!isAuthenticated && !isLoading) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue