Feature: OIDC & social authentication (#5190)

---------

Co-authored-by: Moritz Pflanzer <moritz@chickadee-engineering.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Moritz Pflanzer
2024-02-08 17:15:38 +01:00
committed by GitHub
parent b47f301831
commit c508be6ecd
33 changed files with 1197 additions and 190 deletions

View File

@@ -0,0 +1,27 @@
import { Injectable } from '@angular/core'
// see https://docs.djangoproject.com/en/5.0/ref/contrib/messages/#message-tags
export enum DjangoMessageLevel {
DEBUG = 'debug',
INFO = 'info',
SUCCESS = 'success',
WARNING = 'warning',
ERROR = 'error',
}
export interface DjangoMessage {
level: DjangoMessageLevel
message: string
}
@Injectable({
providedIn: 'root',
})
export class DjangoMessagesService {
constructor() {}
get(): DjangoMessage[] {
// These are embedded in the HTML as raw JS, the service is for convenience
return window['DJANGO_MESSAGES'] ?? []
}
}