mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +03:00
O365 option to use Azure or Personal accounts #1645
This commit is contained in:
parent
3931c11255
commit
198cc852c3
2 changed files with 16 additions and 6 deletions
|
|
@ -1,11 +1,13 @@
|
|||
(rl => {
|
||||
const client_id = rl.pluginSettingsGet('login-o365', 'client_id'),
|
||||
// https://learn.microsoft.com/en-us/entra/identity-platform/reply-url#query-parameter-support-in-redirect-uris
|
||||
query = rl.pluginSettingsGet('login-o365', 'personal') ? '' : '?',
|
||||
tenant = rl.pluginSettingsGet('login-o365', 'tenant'),
|
||||
login = () => {
|
||||
document.location = 'https://login.microsoftonline.com/'+tenant+'/oauth2/v2.0/authorize?' + (new URLSearchParams({
|
||||
response_type: 'code',
|
||||
client_id: client_id,
|
||||
redirect_uri: document.location.href.replace(/\/$/, '') + '/LoginO365',
|
||||
redirect_uri: document.location.href.replace(/\/$/, '') + '/' + query + 'LoginO365',
|
||||
scope: [
|
||||
// Associate personal info
|
||||
'openid',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue