You've already forked AstralRinth
forked from didirus/AstralRinth
Fix issues (#158)
* Fix accept all button simply not working * Switched privacy settings icons to a shield Fixed auth changing the theme and consent Fixed server error on log in / out * Fixed scrolling issue on mobile * Fixed GPDR concerns
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
export default async function (context) {
|
||||
if (!context.from) {
|
||||
if (context.app.$cookies.get('auth-token-reset')) {
|
||||
context.app.$cookies.removeAll()
|
||||
// Only remove the cookie related to the auth, instead of removing everything
|
||||
context.app.$cookies.remove('auth-token')
|
||||
context.app.$cookies.remove('auth-token-reset')
|
||||
return
|
||||
}
|
||||
|
||||
if (context.route.query.code) {
|
||||
const date = new Date()
|
||||
date.setFullYear(new Date().getFullYear() + 1)
|
||||
|
||||
const date = new Date(Date.now() + 6 * 60 * 60 * 1000) // 6 hours
|
||||
context.app.$cookies.set('auth-token', context.route.query.code, {
|
||||
secure: true,
|
||||
sameSite: 'Strict',
|
||||
maxAge: 60 * 60 * 2, // 2 hours
|
||||
httpOnly: true,
|
||||
expires: date,
|
||||
path: '/',
|
||||
|
||||
Reference in New Issue
Block a user