update login/register page && bugfixing error 500 in register page
This commit is contained in:
parent
d33fd58ecf
commit
0ad720f3f7
File diff suppressed because one or more lines are too long
@ -71,9 +71,13 @@ export const GET = async ({locals, url, cookies}) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const path = cookies?.get('path');
|
try {
|
||||||
redirect(301, path?.length !== 0 ? path : "/");
|
const path = cookies?.get('path');
|
||||||
|
redirect(301, path?.length !== 0 ? path : "/");
|
||||||
|
} catch(e) {
|
||||||
|
redirect(301,"/");
|
||||||
|
|
||||||
|
}
|
||||||
//Login user automatically
|
//Login user automatically
|
||||||
|
|
||||||
//const avatarUrl = newUser['meta']['avatarUrl'];
|
//const avatarUrl = newUser['meta']['avatarUrl'];
|
||||||
|
|||||||
@ -96,6 +96,13 @@ export const actions = {
|
|||||||
path: '/',
|
path: '/',
|
||||||
maxAge: 60*60
|
maxAge: 60*60
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cookies.set('path', "/", {httpOnly: true,
|
||||||
|
sameSite: 'lax',
|
||||||
|
secure: true,
|
||||||
|
path: '/',
|
||||||
|
maxAge: 60
|
||||||
|
});
|
||||||
|
|
||||||
oauthState.update( value => state);
|
oauthState.update( value => state);
|
||||||
oauthVerifier.update( value => verifier);
|
oauthVerifier.update( value => verifier);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user