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

Ecto.StaleEntryError when using Guardian.DB.on_revoke #132

Closed
sbinlondon opened this issue May 18, 2021 · 8 comments · Fixed by #141
Closed

Ecto.StaleEntryError when using Guardian.DB.on_revoke #132

sbinlondon opened this issue May 18, 2021 · 8 comments · Fixed by #141

Comments

@sbinlondon
Copy link

In looking up this issue I found #102 and saw that it had been fixed, closed, and merged. But then the code that solved this was refactored in 781d076, removed, and never actually released.

We get tons of Ecto.StaleEntryErrors when using Guardian.DB.on_revoke. Was this written out by mistake, or was there a reason for removing it? Do you have any advice on how to fix this?

@yordis
Copy link
Member

yordis commented May 18, 2021

It seems to be a mistake. We are in the middle of doing a lot of refactoring, here is the file with all the Ecto integration: https://github.com/ueberauth/guardian_db/blob/master/lib/guardian/db/adapter/ecto.ex

@sbinlondon
Copy link
Author

Good to know, thank you! 😊 Do you think it will be in the next release, whenever that is?

@yordis
Copy link
Member

yordis commented May 19, 2021

I am not sure, also we need to add back the line of code that fixes your issue if I am not mistaken.

@alexfilatov
Copy link
Contributor

@sbinlondon haven't tested, but I think if you make guardian_db deps from this repo master branch and put in the Guardian.DB config this line stale_error_field: :stale_token this should fix your issue.
(assuming we passing config to the actual delete() function here https://github.com/ueberauth/guardian_db/blob/master/lib/guardian/db/token.ex#L74)

@yordis
Copy link
Member

yordis commented May 21, 2021

@alexfilatov you are right! 🚀

@yordis
Copy link
Member

yordis commented Nov 8, 2021

Hey folks, I got lost in terms of what suppose to be the follow-up work here 😄 , do you remember?

@yordis
Copy link
Member

yordis commented Sep 11, 2023

@alexfilatov any idea here?

@alexfilatov
Copy link
Contributor

yeah, I believe no followup here, safe to close

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

Successfully merging a pull request may close this issue.

3 participants