Hi i'm using two supabase projects. The first dat...
# help
a
Hi i'm using two supabase projects. The first database is open, no RLS and contains the data. And the second database is used for admin. It has RLS and we using a JWT token for login. We are encountering an issue
JWSError JWSInvalidSignature
. We can't get the data from the 1st database when the user is logged in using the 2nd database. Does anyone experience this?
n
Hello ! This thread has been automatically created from your message in a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
s
When you say you have 2 supabase projects, do you mean two separate projects you created inside the supabase dashboard?
n
azzzzz (2022-03-24)
a
yes exactly sir
s
The JWT would be stored in your localStorage for the 2nd database, so when you try to access the first one it will use that same JWT with the request it is making. This JWT is invalid as it wasn't signed by the key from the 1st database.
a
yes, i stored the JWT in the cookies. How can i prevent the 1st database from getting the key?
s
One suggestion is to use the same JWT secret for both projects
2 Views