Getting a refresh token? #50
-
Hey, I'm building a frontend using SvelteKit, I've also got a FastAPI API (but I don't think that's relevant). I'm not using any of SvelteKit's SSR stuff for auth flows, it's all client-side. I'm having to monkey around with the JS code to get it to work in a svelte-y way, it's going pretty well so far. The issue I'm having is that I can't seem to get a refresh token along with my access token and id token. Here's the code I'm using to generate the login URL:
The This logs the user in just fine, but only gives the access_token, no refresh_token (that I can see). Because this is a public client I'm using the recommended PKCE flow. Is that having an impact here? I don't really understand PKCE at the moment, but I can dive into docs if that's what's needed. I've seen this discussion: #30 which mentions asking for the offline scope and then using the refresh token, but I couldn't see anything in there that would help me out. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hello @WilliamMayor 👋 Welcome to Fief! The valid scope name for getting a refresh token is Try with this scope and tell me how it goes!
Was there a specific issue with the one provided? They were not working? |
Beta Was this translation helpful? Give feedback.
-
Hi! Would it be possible to get a quick rundown on how to implement fief in Svelte client side? I saw the example with react, but can't make much out of it coming mostly from a python fastapi backend... |
Beta Was this translation helpful? Give feedback.
Hello @WilliamMayor 👋 Welcome to Fief!
The valid scope name for getting a refresh token is
offline_access
, notoffline
; your message makes me realize that I was wrong in my previous answer in #30. I've edited it!Try with this scope and tell me how it goes!
Was there a specific issue with the one provided? They were not working?