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) {
|
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, {
|
context.app.$cookies.set('auth-token', context.route.query.code, {
|
||||||
secure: true,
|
secure: true,
|
||||||
sameSite: 'Strict',
|
sameSite: 'Strict',
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ import scopes from '@/privacy-toggles'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Privacy',
|
name: 'Privacy',
|
||||||
fetch() {
|
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) => {
|
Object.keys(scopes.settings).forEach((key) => {
|
||||||
scopes.settings[key].value = false
|
scopes.settings[key].value = false
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user