Skip to content

Commit

Permalink
social auth fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k2so-dev committed Dec 4, 2023
1 parent 0c8d730 commit fc4cee7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nuxt/components/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ async function onSubmit(event: any) {
const providers = ref<{ [key: string]: Provider }>(config.public.providers);
async function handleMessage(event: { data: any }): Promise<void> {
if (event.data.token) {
providers.value[event.data.provider].loading = false;
const provider = event.data.provider as string;
if (Object.keys(providers.value).includes(provider) && event.data.token) {
providers.value[provider].loading = false;
auth.token = event.data.token;
await auth.fetchUser();
Expand Down

0 comments on commit fc4cee7

Please sign in to comment.