feat(auth): support for forwarded auth provider

This commit is contained in:
Igor Rzegocki 2024-04-06 23:13:45 +02:00
parent 0041c277ad
commit bbf9878963
No known key found for this signature in database
GPG key ID: DBF5E35526B27548
12 changed files with 266 additions and 61 deletions

View file

@ -84,8 +84,8 @@ class AuthContext implements IAuthContext {
console.log("Session invalidated");
}
async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean) {
const r = await api.login(email, password, stayLoggedIn);
async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean, provider = "local") {
const r = await api.login(email, password, stayLoggedIn, provider);
if (!r.error) {
const expiresAt = new Date(r.data.expiresAt);