Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase/ssr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.1
Choose a base ref
...
head repository: supabase/ssr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.0
Choose a head ref
  • 9 commits
  • 6 files changed
  • 5 contributors

Commits on Jul 3, 2024

  1. fix: set cookies when mfa challenge is verified (#27)

    ## What kind of change does this PR introduce?
    
    Currently, create server client doesn't seem to set cookies when MFA
    Challenge is verified
    J0 authored Jul 3, 2024
    Copy the full SHA
    c217f53 View commit details
  2. fix: update conventional commits ci to use main instead of master (#31)

    ## What kind of change does this PR introduce?
    
    As per title
    J0 authored Jul 3, 2024
    Copy the full SHA
    bebce89 View commit details
  3. fix: set cookies for password recovery event (#32)

    ## What kind of change does this PR introduce?
    
    Bug fix
    
    ## What is the current behavior?
    
    When resetting a user's password with an email template which has a URL
    defining the `type` value as `recovery`, and using the `verifyOtp`
    method to process the token_hash and type, the SSR server client's
    `onAuthStateChange` function does not recognize the `PASSWORD_RECOVERY`
    event that verifyOtp fires. This prevents the code
    [here](https://github.com/supabase/ssr/blob/main/src/createServerClient.ts#L199-L205)
    from running; resulting in the new session not being saved to cookies,
    and the user is not considered logged in.
    
    Fixes #21
    
    ## What is the new behavior?
    
    User is logged in.
    
    ## Additional context
    
    Replaces PR #24
    
    Co-authored-by: Jason Creviston <jason@malynium.com>
    j4w8n and j4w8n-malynium authored Jul 3, 2024
    Copy the full SHA
    7dc1837 View commit details

Commits on Jul 4, 2024

  1. feat: update CI so it runs on release as well (#33)

    ## What kind of change does this PR introduce?
    
    so that we can unblock v0.4.1. Referencing the Auth workflow:
    https://github.com/supabase/auth/blob/master/.github/workflows/test.yml
    J0 authored Jul 4, 2024
    Copy the full SHA
    4517996 View commit details

Commits on Jul 30, 2024

  1. ci: remove CHANGELOG.md from prettier check (#43)

    Since `CHANGELOG.md` is maintained by Release Please, ignoring prettier
    on it.
    hf authored Jul 30, 2024
    Copy the full SHA
    36d850e View commit details
  2. ci: fix latest npm dist tag when patching versions (#45)

    If a specific patch is made on a release branch, it will always use the
    `patched` NPM dist tag. This also checks if the patched release branch
    is the latest release branch to use the `latest` NPM dist tag.
    hf authored Jul 30, 2024
    Copy the full SHA
    ae6af1d View commit details

Commits on Aug 19, 2024

  1. fix: revert "update CI so it runs on release as well" (#44)

    Reverts #33
    J0 authored Aug 19, 2024
    Copy the full SHA
    9d0e859 View commit details
  2. fix: re-apply update CI so it runs on release as well (#49)

    Reverts #44, i.e. re-applies #33.
    hf authored Aug 19, 2024
    Copy the full SHA
    51d5a43 View commit details
  3. chore(main): release 0.5.0 (#28)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ## [0.5.0](v0.4.0...v0.5.0)
    (2024-08-19)
    
    
    ### Features
    
    * update CI so it runs on release as well
    ([#33](#33))
    ([4517996](4517996))
    
    
    ### Bug Fixes
    
    * re-apply update CI so it runs on release as well
    ([#49](#49))
    ([51d5a43](51d5a43))
    * revert "update CI so it runs on release as well"
    ([#44](#44))
    ([9d0e859](9d0e859))
    * set cookies for password recovery event
    ([#32](#32))
    ([7dc1837](7dc1837))
    * set cookies when mfa challenge is verified
    ([#27](#27))
    ([c217f53](c217f53))
    * update conventional commits ci to use main instead of master
    ([#31](#31))
    ([bebce89](bebce89))
    
    ---
    This PR was generated with [Release
    Please](https://github.com/googleapis/release-please). See
    [documentation](https://github.com/googleapis/release-please#release-please).
    
    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Aug 19, 2024
    Copy the full SHA
    9cd6813 View commit details
Showing with 44 additions and 8 deletions.
  1. +4 −0 .github/workflows/ci.yml
  2. +2 −2 .github/workflows/conventional-commits.yml
  3. +15 −0 .github/workflows/release.yml
  4. +1 −0 .prettierignore
  5. +19 −5 CHANGELOG.md
  6. +3 −1 src/createServerClient.ts
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@ name: CI

on:
pull_request:
push:
branches:
- main
tags: ["*"]

jobs:
lint:
4 changes: 2 additions & 2 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@ name: Check pull requests
on:
push:
branches-ignore: # Run the checks on all branches but the protected ones
- master
- main
- release/*

pull_request_target:
branches:
- master
- main
- release/*
types:
- opened
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -90,6 +90,7 @@ jobs:
echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' > ~/.npmrc
DIST_TAG=patched
if [ "$RELEASE_CANDIDATE" == "true" ]
then
@@ -98,6 +99,20 @@ jobs:
then
# This is the main branch and it's not a prerelease, so the dist-tag should be `latest`.
DIST_TAG=latest
elif [[ "$GITHUB_REF" == "refs/heads/release/"* ]]
then
# This is a release branch. We need to determine if this release
# branch is the _latest_ release branch. If yes, use
# DIST_TAG=latest. Make sure checkout action runs with
# fetch-depth: 0!
LATEST_BRANCH=$(git branch -al origin/release/* --sort=-v:refname | head -n 1 | tr -d "* \t")
REF_AS_REMOTE_BRANCH=$(echo "$GITHUB_REF" | sed "s|refs/heads/|remotes/origin/|g")
if [ "$LATEST_BRANCH" == "$REF_AS_REMOTE_BRANCH" ]
then
DIST_TAG=latest
fi
fi
echo "Publishing @supabase/ssr now..."
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
24 changes: 19 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# @supabase/ssr

## [0.4.0](https://github.com/supabase/ssr/compare/v0.3.0...v0.4.0) (2024-06-24)
## [0.5.0](https://github.com/supabase/ssr/compare/v0.4.0...v0.5.0) (2024-08-19)


### Features

* full rewrite using `getAll` and `setAll` cookie methods ([#1](https://github.com/supabase/ssr/issues/1)) ([b6ae192](https://github.com/supabase/ssr/commit/b6ae192aeb37ac6948637955cf1d3d6179b90065))
* update CI so it runs on release as well ([#33](https://github.com/supabase/ssr/issues/33)) ([4517996](https://github.com/supabase/ssr/commit/4517996a4eea6d41b8ad07c769c78a10b9ee63aa))


### Bug Fixes

* re-apply update CI so it runs on release as well ([#49](https://github.com/supabase/ssr/issues/49)) ([51d5a43](https://github.com/supabase/ssr/commit/51d5a43e2300f46560dc22c67c61f95a6b8d1b3b))
* revert "update CI so it runs on release as well" ([#44](https://github.com/supabase/ssr/issues/44)) ([9d0e859](https://github.com/supabase/ssr/commit/9d0e859cb18b7669f452bc955c6d1c4897873f93))
* set cookies for password recovery event ([#32](https://github.com/supabase/ssr/issues/32)) ([7dc1837](https://github.com/supabase/ssr/commit/7dc1837dc4aba870b32792586969316df980ce07))
* set cookies when mfa challenge is verified ([#27](https://github.com/supabase/ssr/issues/27)) ([c217f53](https://github.com/supabase/ssr/commit/c217f5392b17a80a8e30709445c239e860a107d6))
* update conventional commits ci to use main instead of master ([#31](https://github.com/supabase/ssr/issues/31)) ([bebce89](https://github.com/supabase/ssr/commit/bebce8999d9b2ae554daa2aaffdaf37d972b7fe4))

## [0.4.0](https://github.com/supabase/ssr/compare/v0.3.0...v0.4.0) (2024-06-24)

### Features

- full rewrite using `getAll` and `setAll` cookie methods ([#1](https://github.com/supabase/ssr/issues/1)) ([b6ae192](https://github.com/supabase/ssr/commit/b6ae192aeb37ac6948637955cf1d3d6179b90065))

### Bug Fixes

* allow use of `createBrowserClient` without `window` present ([#20](https://github.com/supabase/ssr/issues/20)) ([27d868d](https://github.com/supabase/ssr/commit/27d868d530925805fe2f3577ae716ece40dd3ab6))
* deprecate `parse`, `serialize` exports for more useful functions ([#14](https://github.com/supabase/ssr/issues/14)) ([0b5f881](https://github.com/supabase/ssr/commit/0b5f881e90b7836f2b98b733aac1cc9f916286cb))
* fix `createBrowserClient` deprecation tsdoc ([#17](https://github.com/supabase/ssr/issues/17)) ([1df70ad](https://github.com/supabase/ssr/commit/1df70ad51e65caab46cbc00342dbb42f6d498c32))
- allow use of `createBrowserClient` without `window` present ([#20](https://github.com/supabase/ssr/issues/20)) ([27d868d](https://github.com/supabase/ssr/commit/27d868d530925805fe2f3577ae716ece40dd3ab6))
- deprecate `parse`, `serialize` exports for more useful functions ([#14](https://github.com/supabase/ssr/issues/14)) ([0b5f881](https://github.com/supabase/ssr/commit/0b5f881e90b7836f2b98b733aac1cc9f916286cb))
- fix `createBrowserClient` deprecation tsdoc ([#17](https://github.com/supabase/ssr/issues/17)) ([1df70ad](https://github.com/supabase/ssr/commit/1df70ad51e65caab46cbc00342dbb42f6d498c32))

## 0.3.0

4 changes: 3 additions & 1 deletion src/createServerClient.ts
Original file line number Diff line number Diff line change
@@ -193,7 +193,9 @@ export function createServerClient<
(event === "SIGNED_IN" ||
event === "TOKEN_REFRESHED" ||
event === "USER_UPDATED" ||
event === "SIGNED_OUT")
event === "PASSWORD_RECOVERY" ||
event === "SIGNED_OUT" ||
event === "MFA_CHALLENGE_VERIFIED")
) {
await applyServerStorage(
{ getAll, setAll, setItems, removedItems },