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

Option to create new token on TokenMismatchException #523

Open
shtrom opened this issue Feb 17, 2023 · 3 comments
Open

Option to create new token on TokenMismatchException #523

shtrom opened this issue Feb 17, 2023 · 3 comments

Comments

@shtrom
Copy link
Member

shtrom commented Feb 17, 2023

Using Nextcloud, as well as Deck and Notes for Android, I have an issue where neither of the apps are able to authenticate anymore.

This is my fault, as I have revoked their tokens in the Web UI after a backup restore.

The app helpfully offer to restart them, or to wipe them and obtain a new token. I would generally do the latter, but in this instance I have changes in the app that haven't been synced to the server, so I don't want to wipe their data.

It would be useful to offer the opportunity to reauthenticate and generate a new token when this happens, rather than having to restart/wipe.

@shtrom
Copy link
Member Author

shtrom commented Feb 17, 2023

Looking at a backup SQL dump, I cannot see the tokens that I thought I had cleared on the server side.

I have recently uninstalled and reinstalled the Nextcloud app on my phone, without touching the Deck and Notes apps. Perhaps the token is missing in the Nextcloud app to let the two others SSO in?

In any case, I think an option to refresh the token without wiping data would still fix the issue.

@David-Development
Copy link
Member

For clarification - if you use the Single-Sign-On Feature in either the Deck or Notes app, you only have one token that you can see in your nextcloud server - and that is for the Nextcloud files app. The Notes and Deck app only generate a token on locally on your phone for communicating with the nextcloud files app.

That said - after wiping out all tokens on your server you should've been able to reauthenticate the Nextcloud files app. The Deck and Notes app would've kept their tokens for communicating with the Nextcloud files app on your phone (not tested - maybe they'll be reseted as well once your Nextcloud files app login is no longer valid)

The following image from the readme explains the communication a little:

@shtrom
Copy link
Member Author

shtrom commented Feb 18, 2023 via email

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