mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
Feature/open id sign in (#35)
* added errorOpenIdLogin i18n key * added openid authProvider * added postOpenIdLogin api call * added via-open-id component Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
d2c6ea464d
commit
a50ad6e6c8
8 changed files with 92 additions and 9 deletions
|
@ -43,3 +43,22 @@ export const postLdapLogin = async (username: string, password: string) => {
|
|||
.then(expectResponseCode())
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
||||
export const postOpenIdLogin = async (openId: string) => {
|
||||
return fetch(getBackendUrl() + "/auth/openid", {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
redirect: 'follow',
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: JSON.stringify({
|
||||
openId: openId
|
||||
})
|
||||
})
|
||||
.then(expectResponseCode())
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue