Skip to content

Commit 5bb9874

Browse files
committed
oauth.md: Fix description redirect_uri matching
The old description just implied that the host/port needed to match. In fact, GitHub only redirect URLs that point to a subdirectory. Update the text to reflect this fact and add a few more examples.
1 parent b865ddf commit 5bb9874

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

content/v3/oauth.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,18 @@ any time.
106106

107107
The `redirect_uri` parameter is optional. If left out, GitHub will
108108
redirect users to the callback URL configured in the OAuth Application
109-
settings. If provided, the redirect URL must match the callback URL's
110-
host.
111-
112-
CALLBACK: http://example.com
113-
114-
GOOD: https://example.com
115-
GOOD: http://example.com/bar
116-
BAD: http://example.com:8080
117-
BAD: http://oauth.example.com:8080
109+
settings. If provided, the redirect URL's host and port must exactly
110+
match the callback URL. The redirect URL's path must reference a
111+
subdirectory of the callback URL.
112+
113+
CALLBACK: http://example.com/path
114+
115+
GOOD: https://example.com/path
116+
GOOD: http://example.com/path/subdir/other
117+
BAD: http://example.com/bar
118+
BAD: http://example.com/
119+
BAD: http://example.com:8080/path
120+
BAD: http://oauth.example.com:8080/path
118121
BAD: http://example.org
119122

120123
## Scopes

0 commit comments

Comments
 (0)