aboutsummaryrefslogtreecommitdiff
path: root/src/components/oauth_callback/oauth_callback.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/oauth_callback/oauth_callback.js')
-rw-r--r--src/components/oauth_callback/oauth_callback.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/oauth_callback/oauth_callback.js b/src/components/oauth_callback/oauth_callback.js
index e3d45ee1..a3c7b7f9 100644
--- a/src/components/oauth_callback/oauth_callback.js
+++ b/src/components/oauth_callback/oauth_callback.js
@@ -4,14 +4,17 @@ const oac = {
props: ['code'],
mounted () {
if (this.code) {
+ const { clientId, clientSecret } = this.$store.state.oauth
+
oauth.getToken({
- app: this.$store.state.oauth,
+ clientId,
+ clientSecret,
instance: this.$store.state.instance.server,
code: this.code
}).then((result) => {
this.$store.commit('setToken', result.access_token)
this.$store.dispatch('loginUser', result.access_token)
- this.$router.push({name: 'friends'})
+ this.$router.push({ name: 'friends' })
})
}
}