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

uid Invalid value #269

Open
marcosantar93 opened this issue Jun 14, 2021 · 12 comments
Open

uid Invalid value #269

marcosantar93 opened this issue Jun 14, 2021 · 12 comments

Comments

@marcosantar93
Copy link

Hi!
It seems like the last PR #266 broke the /dj-rest-auth/password/reset/confirm/ endpoint. If I use the last version of the package with the uid and token on the url which arrives on my email after creating the password reset request, I get

{
    "uid": [
        "Invalid value"
    ]
}

However, after commenting out the include from allauth in dj_rest_auth/serializers.py and using urlsafe_base64_decode instead, the password is successfully changed

Here is the relevant line on my urls.py file

path('password/reset/confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm'),

I'm fairly new to django and I just started using this package, so the error may be on my side.

@iMerica
Copy link
Owner

iMerica commented Jun 16, 2021

cc/ @squio

@squio
Copy link

squio commented Jun 16, 2021

cc/ @squio

Hmm looks like this PR broke more than it solved, please feel free to undo this merge (I have found a different work around which definitely won't break either dj-rest-auth or allauth: see https://gist.github.com/squio/28aadec528bea9302c168744fd0af3b6 )

@RommelTJ
Copy link

RommelTJ commented Jun 28, 2021

I'm seeing a similar issue. Getting errors like the below on version 2.1.7.

{
    "non_field_errors": [
        "“MjJkNjQ4OWUtYjNiMS00MGIxLTgzMDAtMDcxOTAwNzc3YjUy” is not a valid UUID."
    ]
}

Edit: The issue goes away when I downgrade to 2.1.5. Version 2.1.6 still has the issue.

@SebJansen
Copy link

@RommelTJ thanks for sharing your tmp solution to downgrade to 2.1.5; you saved me a lot of time!

@LanceMoe
Copy link
Contributor

Please see my pr: #276

@Tobeyforce
Copy link

On 2.1.9 UID is still invalid & 2.11 didn't work. Downgrading to 2.1.5 worked for me, hoping this gets fixed asap as this effectively makes password reset unusable & wasn't a terribly great experience trying to implement this the first time :(

@lukehinds
Copy link

lukehinds commented Nov 12, 2021

@Tobeyforce any luck?

@Tobeyforce
Copy link

Tobeyforce commented Nov 25, 2021

@Tobeyforce any luck?

I believe I ended up staying on 2.11 but instead overriding a serializer or view. I'm not entirely sure, looking at my prod & local dev I'm at 2.11 at least. It could be that the problem was on the allauth side for me. Wish I could help you out more here & wish I had followed up once I got things working. It could also be that there were some things that needed to be adjusted in urls.py.

Things got quite complicated for me as I ended up using social auth as well which means I went back and forth between allauth docs and dj-rest-auth docs to make all things click.

@mateokurti
Copy link

The same problem happened to me and it gets solved when downgrading to 2.1.5. It is related to the allauth import I think. Is there any solution apart from downgrading or not yet?

@RommelTJ
Copy link

@mateokurti Which version of dj-rest-auth are you using? I haven't tried past version 2.1.7, but this MR got merged so perhaps it's worth a try on the latest release?

@mateokurti
Copy link

mateokurti commented Aug 24, 2022

@RommelTJ I was upgrading all dependencies of my project to latest, so I tried the latest version first and it didn't work. Then tried downgrading until 2.1.5 seemed to work.

I actually have it sleightly different. Instead of:

path('password/reset/confirm/<uidb64>/<token>/',

I have:

path('password/reset/confirm/<uid>/<token>/',

Not sure if that has to do with the problem

@minifisk
Copy link

minifisk commented Sep 6, 2023

Also facing the same problem, why isn't this fixed?!

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

10 participants