You've already forked AstralRinth
forked from didirus/AstralRinth
Change auth token lifetime
This commit is contained in:
@@ -8,7 +8,7 @@ export default async function (context) {
|
||||
}
|
||||
|
||||
if (context.route.query.code) {
|
||||
const date = new Date(Date.now() + 6 * 60 * 60 * 1000) // 6 hours
|
||||
const date = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000) // 30 days
|
||||
context.app.$cookies.set('auth-token', context.route.query.code, {
|
||||
secure: true,
|
||||
sameSite: 'Strict',
|
||||
|
||||
@@ -48,9 +48,9 @@ import scopes from '@/privacy-toggles'
|
||||
export default {
|
||||
name: 'Privacy',
|
||||
fetch() {
|
||||
if (this.$cookies.get('modrinth-scopes') !== null) {
|
||||
this.$store.dispatch('consent/loadFromCookies', this.$cookies)
|
||||
this.$store.dispatch('consent/loadFromCookies', this.$cookies)
|
||||
|
||||
if (this.$store.state.consent.is_consent_given) {
|
||||
Object.keys(scopes.settings).forEach((key) => {
|
||||
scopes.settings[key].value = false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user