diff --git a/src/flow/code-2.html b/src/flow/code-2.html index ae323b5..8bfd167 100644 --- a/src/flow/code-2.html +++ b/src/flow/code-2.html @@ -44,7 +44,7 @@ Build the authorization URL and redirect the user to the authorization server
You have now been redirected back to the application, to the page that was specified in the redirect-url parameter. In the URL you can notice, that there are addtional query parameters: @@ -64,7 +64,7 @@
Let's break it down...
state=
The state parameter is an opaque value used by the client to maintain state between the request and the callback. @@ -81,10 +81,10 @@
+
Now we have everything necessary to obtain token for the user. But is the state we have sent () equivalent to the one we received back ()?
-All that we now need to do is click the button below and login with our credentials. @@ -144,7 +144,8 @@ + "&" + "client_id=" + getClientId() + "&" + "redirect_uri=" + redirectUri + "&" + "scope=" + scope - + "&" + "state=" + state; + //+ "&" + "state=" + state + ; } function fillExample() { @@ -153,7 +154,8 @@ + "&client_id=" + getClientId() + "\n" + "&redirect_uri=" + redirectUri + "\n" + "&scope=" + scope + "\n" - + "&state=" + state; + //+ "&state=" + state + ; $("#requestUriExample").text(requestExample); $("#baseUrl").text(baseUrl); @@ -172,7 +174,7 @@ const responseType = "code"; const redirectUri = getRedirectUri(); - const scope = "photos%20files"; + const scope = "photos files"; const state = generateSessionState(); setCookie("state", state, 5); diff --git a/src/flow/pkce-2.html b/src/flow/pkce-2.html index 3dbec1a..16ea330 100644 --- a/src/flow/pkce-2.html +++ b/src/flow/pkce-2.html @@ -49,7 +49,7 @@ Build the authorization URL and redirect the user to the authorization server
code_challenge=
@@ -159,7 +159,7 @@ + "&" + "client_id=" + getClientId() + "&" + "redirect_uri=" + redirectUri + "&" + "scope=" + scope - + "&" + "state=" + state + //+ "&" + "state=" + state + "&" + "code_challenge=" + codeChallenge + "&" + "code_challenge_method=S256"; } @@ -170,7 +170,7 @@ + "&client_id=" + getClientId() + "\n" + "&redirect_uri=" + redirectUri + "\n" + "&scope=" + scope + "\n" - + "&state=" + state + "\n" + //+ "&state=" + state + "\n" + "&code_challenge=" + codeChallenge + "\n" + "&code_challenge_method=S256"; @@ -191,7 +191,7 @@ const responseType = "code"; const redirectUri = getRedirectUri(); - const scope = "photos%20files"; + const scope = "photos files"; const state = generateSessionState(); const codeChallenge = getCookie("code_challenge"); diff --git a/src/flow/pkce-3.html b/src/flow/pkce-3.html index 1af7d09..2a7922e 100644 --- a/src/flow/pkce-3.html +++ b/src/flow/pkce-3.html @@ -51,7 +51,7 @@ Build the authorization URL and redirect the user to the authorization server
You have now been redirected back to the application, to the page that was specified in the redirect-url parameter. In the URL you can notice, that there are addtional query parameters:
Let's break it down...
state=
The state parameter is an opaque value used by the client to maintain state between the request and the callback. @@ -93,11 +93,11 @@
+
Now we have everything necessary to obtain token for the user. But is the state we have sent () equivalent to the one we received back ()?
-You have now been redirected back to the application, to the page that was specified in the redirect-url parameter. In the URL you can notice, that there are addtional query parameters: @@ -64,7 +64,7 @@
Let's break it down...
state=
The state parameter is an opaque value used by the client to maintain state between the request and the callback. @@ -82,10 +82,10 @@
+
Now we have everything necessary to obtain token for the user. But is the state we have sent () equivalent to the one we received back ()?
-- In order to initiate the WebAuthn, we proceed the same way as we would if we would be using Authorization Code Flow we need to build the - authorization URL and redirect the user to the authorization server. All the passwordless logic is handled completely by the authorization server. The URL is constructed as follows: + WebAuthn is not an OAuth grant, but rather a new browser API to facilitate passwordless login. +
+It can be used with any grant that renders a login form, + such as Authorization Code Flow or Device Authorization Grant, or even outside OAuth for your application's custom login. +
++ For this demostration, we'll use an Authorization Code Flow with a custom URL. In practice, if and when Webauthn is used instead of passwords passwords depends on the Authority Server settings. +
- Let's break it down...
+All that we now need to do is click the button below and perform the Web Authentication Flow on the server. After your account will be successfully verified, you will be redirected back to this playground, to the URL we have specified in the redirect_uri query parameter of the request.
@@ -143,7 +149,8 @@ + "&" + "client_id=" + getClientId() + "&" + "redirect_uri=" + redirectUri + "&" + "scope=" + scope - + "&" + "state=" + state; + //+ "&" + "state=" + state + ; } function fillExample() { @@ -152,7 +159,8 @@ + "&client_id=" + getClientId() + "\n" + "&redirect_uri=" + redirectUri + "\n" + "&scope=" + scope + "\n" - + "&state=" + state; + //+ "&state=" + state + ; $("#requestUriExample").text(requestExample); $("#baseUrl").text(authUrl); @@ -172,7 +180,7 @@ const authUrl = baseUrl + "/passwordless" const responseType = "code"; const redirectUri = getRedirectUri(); - const scope = "photos%20files"; + const scope = "photos files"; const state = generateSessionState(); setCookie("webauth-state", state, 5);