Skip to content

fix: handle null session id#667

Merged
kangmingtay merged 6 commits intomasterfrom
km/fix-null-session-id
Sep 6, 2022
Merged

fix: handle null session id#667
kangmingtay merged 6 commits intomasterfrom
km/fix-null-session-id

Conversation

@kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • omit session_id from access token jwt if session_id is uuid.Nil
  • createRefreshToken should create a new session if one doesn't exist (uuid.Nil)
  • maybeLoadUserOrSession should skip reading session_id from claim if it's a uuid.Nil
  • Add tests for auth middleware functions

@kangmingtay kangmingtay self-assigned this Sep 6, 2022
@kangmingtay kangmingtay requested a review from a team as a code owner September 6, 2022 10:03
Copy link
Contributor

@hf hf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

* refactor: use ptr instead of nulls.UUID

* update tests
@kangmingtay kangmingtay merged commit 0f36e91 into master Sep 6, 2022
@kangmingtay kangmingtay deleted the km/fix-null-session-id branch September 6, 2022 15:40
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

🎉 This PR is included in version 2.16.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (supabase#668)

* refactor: use ptr instead of nulls.UUID

* update tests
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (supabase#668)

* refactor: use ptr instead of nulls.UUID

* update tests
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (supabase#668)

* refactor: use ptr instead of nulls.UUID

* update tests
cemalkilic pushed a commit that referenced this pull request Aug 7, 2025
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (#668)

* refactor: use ptr instead of nulls.UUID

* update tests
xeladotbe pushed a commit to xeladotbe/supabase-auth that referenced this pull request Sep 27, 2025
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (supabase#668)

* refactor: use ptr instead of nulls.UUID

* update tests
fadymak pushed a commit that referenced this pull request Sep 30, 2025
* fix: omit session_id in jwt if null

* fix: exclude null session uuid from claim

* refactor: remove unused http.ResponseWriter

* test: add test for auth middleware methods

* resolve pr comments

* refactor: use uuid ptr instead of nulls.UUID (#668)

* refactor: use ptr instead of nulls.UUID

* update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants