feat: implement multiple oauth providers in the frontend

This commit is contained in:
Stavros
2025-09-12 14:38:06 +03:00
parent fbf5843592
commit e5ecf6336f
18 changed files with 77 additions and 62 deletions

View File

@@ -19,6 +19,7 @@ type UserContextResponse struct {
Provider string `json:"provider"`
OAuth bool `json:"oauth"`
TotpPending bool `json:"totpPending"`
OAuthName string `json:"oauthName"`
}
type AppContextResponse struct {
@@ -80,6 +81,7 @@ func (controller *ContextController) userContextHandler(c *gin.Context) {
Provider: context.Provider,
OAuth: context.OAuth,
TotpPending: context.TotpPending,
OAuthName: context.OAuthName,
}
if err != nil {

View File

@@ -186,6 +186,7 @@ func (controller *OAuthController) oauthCallbackHandler(c *gin.Context) {
Email: user.Email,
Provider: req.Provider,
OAuthGroups: utils.CoalesceToString(user.Groups),
OAuthName: service.GetName(),
})
if err != nil {