diff options
| author | Roger Braun <roger@rogerbraun.net> | 2018-11-13 20:21:04 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2018-11-13 20:21:04 +0100 |
| commit | 7f13cbc493862cfe3f93f7e33e14cf73de92de66 (patch) | |
| tree | 8cceac003cb8ff5e6de43000e25dfb07debcf58a /src/components/oauth_callback | |
| parent | ffb9d4faf5c6cebb89947a0a9a085fa07e295d42 (diff) | |
| parent | 11f8a4f312675a82d5fed9c5e75fed63a8456ffc (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into dm-tab
Diffstat (limited to 'src/components/oauth_callback')
| -rw-r--r-- | src/components/oauth_callback/oauth_callback.js | 20 | ||||
| -rw-r--r-- | src/components/oauth_callback/oauth_callback.vue | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/components/oauth_callback/oauth_callback.js b/src/components/oauth_callback/oauth_callback.js new file mode 100644 index 00000000..7a5132ad --- /dev/null +++ b/src/components/oauth_callback/oauth_callback.js @@ -0,0 +1,20 @@ +import oauth from '../../services/new_api/oauth.js' + +const oac = { + props: ['code'], + mounted () { + if (this.code) { + oauth.getToken({ + app: this.$store.state.oauth, + 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('/main/friends') + }) + } + } +} + +export default oac diff --git a/src/components/oauth_callback/oauth_callback.vue b/src/components/oauth_callback/oauth_callback.vue new file mode 100644 index 00000000..9c806916 --- /dev/null +++ b/src/components/oauth_callback/oauth_callback.vue @@ -0,0 +1,5 @@ +<template> + <h1>...</h1> +</template> + +<script src="./oauth_callback.js"></script> |
