add microsoft login
This commit is contained in:
@@ -16,5 +16,11 @@
|
||||
"token_url": "https://oauth2.googleapis.com/token",
|
||||
"userinfo_url": "https://www.googleapis.com/oauth2/v1/userinfo?alt=json",
|
||||
"scopes": ["https://www.googleapis.com/auth/userinfo.email"]
|
||||
},
|
||||
"microsoft": {
|
||||
"auth_url": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
|
||||
"token_url": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
|
||||
"userinfo_url": "https://graph.microsoft.com/oidc/userinfo",
|
||||
"scopes": ["openid", "profile", "email"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -820,7 +820,7 @@ async fn slack_command(
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct UserInfo {
|
||||
email: Option<String>,
|
||||
name: Option<String>,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { faGithub, faGitlab, faGoogle } from '@fortawesome/free-brands-svg-icons'
|
||||
import { faGithub, faGitlab, faGoogle, faMicrosoft } from '@fortawesome/free-brands-svg-icons'
|
||||
import { onMount } from 'svelte'
|
||||
import { slide } from 'svelte/transition'
|
||||
import { OauthService, UserService, WorkspaceService } from '$lib/gen'
|
||||
@@ -38,6 +38,11 @@
|
||||
type: 'google',
|
||||
name: 'Google',
|
||||
icon: faGoogle
|
||||
},
|
||||
{
|
||||
type: 'microsoft',
|
||||
name: 'Microsoft',
|
||||
icon: faMicrosoft
|
||||
}
|
||||
] as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user