Skip to content

Commit 569b4f1

Browse files
authored
Merge pull request #46388 from KoenZomers/patch-1
Changed HOST to POST
2 parents f9fdb23 + 825a93e commit 569b4f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/active-directory-b2c/active-directory-b2c-reference-oauth-code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ Now that you've acquired an authorization code, you can redeem the `code` for a
9898
You can also request an access token for your app's own back-end Web API by convention of using the app's client ID as the requested scope (which will result in an access token with that client ID as the "audience"):
9999

100100
```HTTP
101-
POST {tenant}.onmicrosoft.com/{policy}/oauth2/v2.0/token HTTP/1.1
102-
Host: {tenant}.b2clogin.com
101+
POST https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{policy}/oauth2/v2.0/token HTTP/1.1
102+
103103
Content-Type: application/x-www-form-urlencoded
104104
105105
grant_type=authorization_code&client_id=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6&scope=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6 offline_access&code=AwABAAAAvPM1KaPlrEqdFSBzjqfTGBCmLdgfSTLEMPGYuNHSUYBrq...&redirect_uri=urn:ietf:wg:oauth:2.0:oob
@@ -165,8 +165,8 @@ Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZn
165165
Access tokens and ID tokens are short-lived. After they expire, you must refresh them to continue to access resources. To do this, submit another POST request to the `/token` endpoint. This time, provide the `refresh_token` instead of the `code`:
166166

167167
```HTTP
168-
POST {tenant}.onmicrosoft.com/{policy}/oauth2/v2.0/token HTTP/1.1
169-
Host: {tenant}.b2clogin.com
168+
POST https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{policy}/oauth2/v2.0/token HTTP/1.1
169+
170170
Content-Type: application/x-www-form-urlencoded
171171
172172
grant_type=refresh_token&client_id=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6&scope=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6 offline_access&refresh_token=AwABAAAAvPM1KaPlrEqdFSBzjqfTGBCmLdgfSTLEMPGYuNHSUYBrq...&redirect_uri=urn:ietf:wg:oauth:2.0:oob

0 commit comments

Comments
 (0)