Commit d8d5c21
committed
Do not include query params in callback URLs
In order to be compatible with GitHub Integration's Oauth flow the callback URL
must match the same one provided in the integration's settings page. The current
`callback_url` method includes any query params received previously, which
causes a mismatch, and GitHub returns "406 Not Accepted" with an error message:
```
(github) Callback phase initiated.
(github) Authentication failure! invalid_credentials: OAuth2::Error,
redirect_uri_mismatch: The redirect_uri MUST match the registered callback URL
for this application.
error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+
the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2
Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch2
```
For more information:
https://developer.github.com/early-access/integrations/user-identification-authorization1 parent a893c2b commit d8d5c21
File tree
2 files changed
+13
-0
lines changed- lib/omniauth/strategies
- spec/omniauth/strategies
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
152 | 161 | | |
0 commit comments