Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
15242a86
Commit
15242a86
authored
Jun 13, 2017
by
rithu leena john
Committed by
GitHub
Jun 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #967 from rithujohn191/err-msg
connector: improve error message for callback URL mismatch
parents
1d7abf89
682d78f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
github.go
connector/github/github.go
+1
-1
oidc.go
connector/oidc/oidc.go
+1
-1
No files found.
connector/github/github.go
View file @
15242a86
...
...
@@ -130,7 +130,7 @@ func (c *githubConnector) oauth2Config(scopes connector.Scopes) *oauth2.Config {
func
(
c
*
githubConnector
)
LoginURL
(
scopes
connector
.
Scopes
,
callbackURL
,
state
string
)
(
string
,
error
)
{
if
c
.
redirectURI
!=
callbackURL
{
return
""
,
fmt
.
Errorf
(
"expected callback URL
did not match the URL in the config"
)
return
""
,
fmt
.
Errorf
(
"expected callback URL
%q did not match the URL in the config %q"
,
callbackURL
,
c
.
redirectURI
)
}
return
c
.
oauth2Config
(
scopes
)
.
AuthCodeURL
(
state
),
nil
...
...
connector/oidc/oidc.go
View file @
15242a86
...
...
@@ -136,7 +136,7 @@ func (c *oidcConnector) Close() error {
func
(
c
*
oidcConnector
)
LoginURL
(
s
connector
.
Scopes
,
callbackURL
,
state
string
)
(
string
,
error
)
{
if
c
.
redirectURI
!=
callbackURL
{
return
""
,
fmt
.
Errorf
(
"expected callback URL
did not match the URL in the config"
)
return
""
,
fmt
.
Errorf
(
"expected callback URL
%q did not match the URL in the config %q"
,
callbackURL
,
c
.
redirectURI
)
}
return
c
.
oauth2Config
.
AuthCodeURL
(
state
),
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment