Use pinia oauth store in mfa forms

Taken from 216d318bb5
This commit is contained in:
Phantasm 2025-03-25 22:24:58 +01:00
parent f1910b37d3
commit d49a4196c7
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
3 changed files with 8 additions and 4 deletions

View file

View file

@ -1,5 +1,7 @@
import mfaApi from '../../services/new_api/mfa.js'
import { mapState, mapGetters, mapActions, mapMutations } from 'vuex'
import { mapStores } from 'pinia'
import { useOAuthStore } from 'src/stores/oauth.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faTimes
@ -18,9 +20,9 @@ export default {
...mapGetters({
authSettings: 'authFlow/settings'
}),
...mapStores(useOAuthStore),
...mapState({
instance: 'instance',
oauth: 'oauth'
})
},
methods: {
@ -28,7 +30,7 @@ export default {
...mapActions({ login: 'authFlow/login' }),
clearError () { this.error = false },
submit () {
const { clientId, clientSecret } = this.oauth
const { clientId, clientSecret } = this.oauthStore
const data = {
clientId,

View file

@ -1,5 +1,7 @@
import mfaApi from '../../services/new_api/mfa.js'
import { mapState, mapGetters, mapActions, mapMutations } from 'vuex'
import { mapStores } from 'pinia'
import { useOAuthStore } from 'src/stores/oauth.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faTimes
@ -18,9 +20,9 @@ export default {
...mapGetters({
authSettings: 'authFlow/settings'
}),
...mapStores(useOAuthStore),
...mapState({
instance: 'instance',
oauth: 'oauth'
})
},
methods: {
@ -28,7 +30,7 @@ export default {
...mapActions({ login: 'authFlow/login' }),
clearError () { this.error = false },
submit () {
const { clientId, clientSecret } = this.oauth
const { clientId, clientSecret } = this.oauthStore
const data = {
clientId,