mirror of
https://github.com/bitinflow/nuxt-oauth.git
synced 2026-03-13 13:45:59 +00:00
Make options optional
Revert default routes Update documentation
This commit is contained in:
@@ -4,6 +4,9 @@ export default defineNuxtConfig({
|
||||
ssr: false,
|
||||
|
||||
oauth: {
|
||||
redirect: {
|
||||
home: '/home'
|
||||
},
|
||||
clientId: '98e1cb74-125a-4d60-b686-02c2f0c87521',
|
||||
scope: ['user:read']
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ definePageMeta({
|
||||
|
||||
const { $api } = useNuxtApp()
|
||||
|
||||
$api.get('users/@me')
|
||||
$api.get('user')
|
||||
.then((response: any) => {
|
||||
console.log(response.data)
|
||||
})
|
||||
@@ -20,7 +20,7 @@ $api.get('users/@me')
|
||||
|
||||
<template>
|
||||
<div v-if="user">
|
||||
Hello {{ user.name }}
|
||||
Hello {{ user.data.first_name }}
|
||||
|
||||
<button @click="signOut">
|
||||
Sign Out
|
||||
|
||||
@@ -7,7 +7,7 @@ export default defineNuxtPlugin(async () => {
|
||||
const {bearerToken, accessToken} = await useAuth();
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: 'https://id.stream.tv/api/',
|
||||
baseURL: 'https://accounts.bitinflow.com/api/v3/',
|
||||
headers: {
|
||||
common: {
|
||||
'Authorization': bearerToken(),
|
||||
|
||||
Reference in New Issue
Block a user