File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
services/auth/source/oauth2 Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,6 @@ func SignInOAuth(ctx *context.Context) {
72
72
73
73
// SignInOAuthCallback handles the callback from the given provider
74
74
func SignInOAuthCallback (ctx * context.Context ) {
75
- provider := ctx .PathParam ("provider" )
76
-
77
75
if ctx .Req .FormValue ("error" ) != "" {
78
76
var errorKeyValues []string
79
77
for k , vv := range ctx .Req .Form {
@@ -86,7 +84,8 @@ func SignInOAuthCallback(ctx *context.Context) {
86
84
}
87
85
88
86
// first look if the provider is still active
89
- authSource , err := auth .GetActiveOAuth2SourceByAuthName (ctx , provider )
87
+ authName := ctx .PathParam ("provider" )
88
+ authSource , err := auth .GetActiveOAuth2SourceByAuthName (ctx , authName )
90
89
if err != nil {
91
90
ctx .ServerError ("SignIn" , err )
92
91
return
Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ import (
12
12
13
13
// BaseProvider represents a common base for Provider
14
14
type BaseProvider struct {
15
- name string
16
- displayName string
15
+ name string
16
+ displayName string
17
+
18
+ // TODO: maybe some providers also support SSH public keys, then they can set this to true
17
19
supportSSHPublicKey bool
18
20
}
19
21
You can’t perform that action at this time.
0 commit comments