rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.61k stars 271 forks source link

Retain auth on browser refresh #998

Open CoenraadS opened 5 months ago

CoenraadS commented 5 months ago

Swagger has an option to preserve authorization on browser refresh/close

https://github.com/swagger-api/swagger-ui/pull/5939/files

It would be great if RapiDoc could do the same. I use BASIC auth and would like a 'remember me' option.

brunchboy commented 3 months ago

This would definitely be nice!

Qu4tro commented 2 months ago

Have you tried persist-auth ?

https://rapidocweb.com/api.html#att-general

brunchboy commented 2 months ago

Thank you @Qu4tro that looked very promising and we had somehow missed it. Unfortunately, it looks like only a partial solution as it stands today. It seems to work if you manually paste in a bearer token, but if you are using an OAuth flow, which is our most important use case, the auth does not survive a page refresh, which makes sense because nothing is visible in local storage.

wparad commented 2 months ago

@brunchboy that's something we've actually been considering adding over in the OpenAPI Explorer (which started out as a fork of this repo, but has grown into something more). If this is critical for you, and you're open to switching, depending on your main requirements, I'm sure that this is something we could prioritize.