Skip to content

Commit

Permalink
APP-5767: Remove auth0 install handler (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcook-viam authored Oct 3, 2024
1 parent 73fb80d commit 1bbe91e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
34 changes: 1 addition & 33 deletions web/auth0.go → web/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

// AuthProviderConfig config options with constants that will probably need to be manually configured after
// retrieval from the auth provider web UI or API (e.g. for Auth0, FusionAuth).
// retrieval from the auth provider web UI or API (e.g. for FusionAuth).
type AuthProviderConfig struct {
Domain string
ClientID string
Expand Down Expand Up @@ -67,38 +67,6 @@ func (s *AuthProvider) newAuthProvider(ctx context.Context) (*oidc.Provider, err
return p, nil
}

// InstallAuth0 does initial setup and installs routes for auth0.
func InstallAuth0(
ctx context.Context,
mux *goji.Mux,
sessions *SessionManager,
config AuthProviderConfig,
logger utils.ZapCompatibleLogger,
) (io.Closer, error) {
config.PostLogoutRedirectURL = "returnTo"
authProvider, err := installAuthProvider(
ctx,
sessions,
config,
"/callback",
"auth0_redirect_state")
if err != nil {
return nil, err
}

installAuthProviderRoutes(
mux,
authProvider,
// see https://auth0.com/docs/authenticate/login/logout/redirect-users-after-logout
"/v2/logout",
authProvider.redirectURL,
authProvider.stateCookieName,
authProvider.stateCookieMaxAge,
logger)

return authProvider, nil
}

// InstallFusionAuth does initial setup and installs routes for FusionAuth.
func InstallFusionAuth(
ctx context.Context,
Expand Down
2 changes: 1 addition & 1 deletion web/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (u *UserInfo) GetBool(name string) bool {
return b
}

// GetUpdatedAt gets the timestamp indicating when the user's auth0 profile was last updated/modified.
// GetUpdatedAt gets the timestamp indicating when the user's profile was last updated/modified.
func (u *UserInfo) GetUpdatedAt() string {
if u.Properties == nil {
return ""
Expand Down

0 comments on commit 1bbe91e

Please sign in to comment.