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

Permit atom keys when verifying claims with EnsureAuthenticated #696

Merged
merged 4 commits into from
Mar 21, 2022
Merged

Permit atom keys when verifying claims with EnsureAuthenticated #696

merged 4 commits into from
Mar 21, 2022

Conversation

giddie
Copy link
Contributor

@giddie giddie commented Mar 17, 2022

No description provided.

@giddie giddie requested a review from a team as a code owner March 17, 2022 15:48
@yordis
Copy link
Member

yordis commented Mar 17, 2022

Hey peep, do you mind sharing what is the use case for the feature? Not sure what the limitations were before. Was it functional or astetic?

@giddie
Copy link
Contributor Author

giddie commented Mar 18, 2022

Sure, it's pretty simple really:

# This halts the conn, even when claims match `%{"custom_claim" => true}`
plug Guardian.Plug.EnsureAuthenticated, claims: %{custom_claim: true}

# This works as expected
plug Guardian.Plug.EnsureAuthenticated, claims: %{"custom_claim" => true}

Since other functions, such as decode_and_verify handle atom keys OK when verifying claims, I was a bit confused by this behaviour.

@yordis
Copy link
Member

yordis commented Mar 18, 2022

Do you mind adding an entry in the CHANGELOG.md and bumping the version accordingly?

@yordis yordis merged commit 49702bc into ueberauth:master Mar 21, 2022
@yordis
Copy link
Member

yordis commented Mar 21, 2022

🚀

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 this pull request may close these issues.

2 participants