feat: add apple as idp (#6442)

* feat: manage apple idp

* handle apple idp callback

* add tests for provider

* basic console implementation

* implement flow for login UI and add logos / styling

* tests

* cleanup

* add upload button

* begin i18n

* apple logo positioning, file upload component

* fix add apple instance idp

* add missing apple logos for login

* update to go 1.21

* fix slice compare

* revert permission changes

* concrete error messages

* translate login apple logo -y-2px

* change form parsing

* sign in button

* fix tests

* lint console

---------

Co-authored-by: peintnermax <max@caos.ch>
This commit is contained in:
Livio Spring
2023-08-31 08:39:16 +02:00
committed by GitHub
parent 0d94947d3c
commit e17b49e4ca
89 changed files with 4384 additions and 64 deletions

View File

@@ -36,6 +36,7 @@ const (
IDPTypeGitLab
IDPTypeGitLabSelfHosted
IDPTypeGoogle
IDPTypeApple
)
func (t IDPType) GetCSSClass() string {
@@ -50,6 +51,8 @@ func (t IDPType) GetCSSClass() string {
return "gitlab"
case IDPTypeAzureAD:
return "azure"
case IDPTypeApple:
return "apple"
case IDPTypeUnspecified,
IDPTypeOIDC,
IDPTypeJWT,
@@ -78,6 +81,8 @@ func (t IDPType) DisplayName() string {
return "GitLab"
case IDPTypeGoogle:
return "Google"
case IDPTypeApple:
return "Apple"
case IDPTypeUnspecified,
IDPTypeOIDC,
IDPTypeJWT,
@@ -94,6 +99,12 @@ func (t IDPType) DisplayName() string {
}
}
// IsSignInButton returns if the button should be displayed with a translated
// "Sign in with {{.DisplayName}}", e.g. "Sign in with Apple"
func (t IDPType) IsSignInButton() bool {
return t == IDPTypeApple
}
type IDPIntentState int32
const (