My service role key and public key have the exact same code

Google and Cursor are saying this shouldn't happen, but when I tried to generate a new key they are still the same
14 Replies
garyaustin
garyaustin4mo ago
Is this Supabase hosted? You checked them with JWT.io?
Brayden Pelt
Brayden PeltOP4mo ago
Yes when I go to my Supabase dashboard and it show me the keys they are the exact same I visited JWT.io for the first time and my keys are not working on there, but I copied and pasted them from the Supabase dashboard so I'm not really sure where the issue is coming from
garyaustin
garyaustin4mo ago
Show the place you are getting them. They always work in JWT.io.
Also try another browser
Brayden Pelt
Brayden PeltOP4mo ago
Can I screenshot and send it in here? Or to you in a dm? I'm getting them from the "data api" section of the project settings I just dm'd it a screenshot to you
garyaustin
garyaustin4mo ago
Another browser? Using copy button? How are you checking same ?
Brayden Pelt
Brayden PeltOP4mo ago
Whenever I copy and paste them they have the same value
garyaustin
garyaustin4mo ago
It should work in JWT.io. Are you copying the whole thing? They are almost exactly the same except for a few characters towards end?
silentworks
silentworks4mo ago
Are you the same person on this Reddit post? https://www.reddit.com/r/Supabase/comments/1kku1uk/how_to_change_service_key/, I'm asking just so we can keep providing help in one place.
Brayden Pelt
Brayden PeltOP4mo ago
No, that is a different person. I think I figured out my problem and it is working on JWT.io now. I am running into an issue on my website where I can have users sign in, but if I reload the page while they are on their profile the page won't reload. I think it is because of an issue reaching the Supabase database connected to my website. I fogured the keys might be the problem, but I don't think it is anymore. If either of you have seen this issue in the past, please let me know. It might not be on Supabase's end, but that's how it seems as of now I appreciate your help, I would be lost without it
silentworks
silentworks4mo ago
You should start a new post about the issue you are having and provide a bit more details like which framework you are using and what code you have on the page you are trying to reload that isn't working.
kmayfield109
kmayfield1093mo ago
I just incurred this EXACT issue - @Brayden Pelt do you mind sharing exactly how you fixed it?
Brayden Pelt
Brayden PeltOP3mo ago
Hi, the issue wasn’t with the keys. They are super long, and they’re the same at the beginning. If you copy and paste them into a notes app on your computer you’ll see that they’re different at the end. I ran into some issues with the Supabase integration on my website, but after playing around with it for a few days I got it working If you are having an issue with user login or anything to do with bugs on reload of the site, the issue is most likely in the code. I had to completely rebuild my user profile/ login page for my site, and after testing it piece by piece I was able to find the issue and fix it. Having Cursor’s AI to help me was huge if you aren’t using that already
kmayfield109
kmayfield1093mo ago
thanks! i'm having issues with some of my API keys not seeming to be active in Lovable but they're in Supabase - the challenge is having to DELETE them in Supabase versus just updating them. i'm using Claude 3.7 sonnet which has also been helpful but will consider Cursor too!
Evan D
Evan D3mo ago
I actually built my login w/ cursor but it totally broke it I suspect bc I opt out of email verification

Did you find this page helpful?