fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Support silent renewal with prompt=none in Oauth2 Implicit Grant

Open lamuertepeluda opened this issue 5 years ago • 4 comments

Support silent renewal with prompt=none in Oauth2 Implicit Grant

Problem

Missing support for silent renewal in OAuth2 Implict Grant

Solution

Support for prompt=none in Implicit Grant as described in OpenID Connect Core 1.0

Alternatives/workarounds

The only workaround known is currently described here: https://stackoverflow.com/questions/55859793/is-prompt-none-for-silent-refresh-in-a-spa-possible-with-fusionauth-and-its-prov

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

lamuertepeluda avatar Mar 16 '20 16:03 lamuertepeluda

Here's a further workaround: https://stackoverflow.com/questions/61531844/attempting-to-implement-silent-refresh-with-fusion-auth

mooreds avatar May 01 '20 19:05 mooreds

I think my concern here is that when using a library like oidc-client-js, getting in between it and the refresh starts to erode the autowiring perks of OIDC.

atrauzzi avatar May 26 '20 20:05 atrauzzi

I noticed that FusionAuth is already half way to supporting prompt=none. Since the expected behavior is the same as without prompt=none in the case you are logged in, it will already return a 302 redirect to the return url. On the surface it seems trivial for FusionAuth to check for prompt=none and return a 302 as well instead of displaying the login page. It should just return to the redirect url with the query string parameter error=login_required and include the state as well ... It is probably more complicated than that but that is the behavior I see from other providers. I was able to "fake" it by adding the following javascript to the header in the theme ... but oidc-client.js still doesn't work due to X-Frame-Options: Deny being sent (I have submitted issue #1003 to address that).

      const urlParams = new URLSearchParams(window.location.search);
      if (urlParams.has('prompt'))
      {
         const promptParam = urlParams.get('prompt');
         if (promptParam === 'none')
         {
            window.location = '${redirect_uri}?error=login_required&state=${state}';
         }
      }

kstrouse avatar Nov 20 '20 18:11 kstrouse

Had a customer ask for this today.

mooreds avatar Oct 27 '21 17:10 mooreds

Should we track this via #2208 or vice versa?

voidmain avatar May 02 '23 17:05 voidmain