Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db import with outdated claims throws websocket error #2061

Open
MuffinTheDragon opened this issue Aug 24, 2024 · 2 comments
Open

db import with outdated claims throws websocket error #2061

MuffinTheDragon opened this issue Aug 24, 2024 · 2 comments

Comments

@MuffinTheDragon
Copy link

MuffinTheDragon commented Aug 24, 2024

I'm using the import, export feature based on the provided sample

The data import works fine, but if I try to sync with the db or refresh the claims, I get a websocket error:

image

I made some changes recently that synced with the server, then tried importing a backup from about a month ago where my license was expired. But it seems like if the access token is expired, it throws this error

Is that error expected in this case or is there something I might be doing incorrectly?

@dfahlander
Copy link
Collaborator

The private key, which is used to authorize refresh token requests, is not exportable (for security reasons) so when it's imported you won't get a valid CryptoKey back. We should probably detect this use case better and require reauthentication when this happens. A workaround is to delete the refreshToken and the private / public key pairs from the $logins table entry holding your user info. Maybe use a transform callback when importing or delete this data directly after import. This should lead to a reauthentication flow

@MuffinTheDragon
Copy link
Author

I tried deleting the refresh token as well as the key pairs right after the import call, but it doesn't trigger a reauthentication:

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants