diff --git a/locale/en/corteza-server/auth/oauth2-authorize-client.yaml b/locale/en/corteza-server/auth/oauth2-authorize-client.yaml index a4077e0b9..a4a618496 100644 --- a/locale/en/corteza-server/auth/oauth2-authorize-client.yaml +++ b/locale/en/corteza-server/auth/oauth2-authorize-client.yaml @@ -11,4 +11,4 @@ template: errors: invalid-user: Cannot continue with unauthorized email, visit your profile and resolve the issue. alerts: - denied: cannot authorize {{client}}, no permissions + denied: 'Failed to authorize {{client}}: insufficient permissions' diff --git a/server/app/boot_auth.go b/server/app/boot_auth.go index be957f638..8e2371b76 100644 --- a/server/app/boot_auth.go +++ b/server/app/boot_auth.go @@ -39,6 +39,10 @@ func (app *CortezaApp) initAuth(ctx context.Context) (err error) { // set base path for links&routes in auth server authHandlers.BasePath = app.Opt.HTTPServer.BaseUrl + // set webapp base path in auth server + // @todo refactor, consider passing this into the functions that need it instead of setting it globally + authHandlers.WebappBasePath = app.Opt.HTTPServer.WebappBaseUrl + auth.DefaultSigner = auth.HmacSigner(app.Opt.Auth.Secret) if auth.HttpTokenVerifier, err = auth.TokenVerifierMiddlewareWithSecretSigner(app.Opt.Auth.Secret); err != nil { diff --git a/server/auth/assets/templates/inc_nav.html.tpl b/server/auth/assets/templates/inc_nav.html.tpl index 753460e0c..dee2086f2 100644 --- a/server/auth/assets/templates/inc_nav.html.tpl +++ b/server/auth/assets/templates/inc_nav.html.tpl @@ -12,18 +12,7 @@ {{ $activeNav := default "" .activeNav }} {{ if not .hideNav }} - {{ if and .user .client }} -
- {{ else if .user }} + {{ if .user }}