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

[Bug?]: Supabase auth client.auth.getSessionFromUrl is not a function #6721

Closed
1 task
lunchbreakdev opened this issue Oct 14, 2022 · 5 comments
Closed
1 task
Assignees
Labels
bug/needs-info More information is needed for reproduction topic/auth

Comments

@lunchbreakdev
Copy link
Contributor

What's not working?

When using Supabase as an auth provider and providing the necessary env variables the app returns the below error on startup and cannot utilize any auth functionality

Uncaught (in promise) TypeError: client.auth.getSessionFromUrl is not a function

How do we reproduce the bug?

  1. Generate a new app
  2. Run yarn rw setup auth supabase
  3. Provide necessary env variables
  4. Run yarn rw dev

What's your environment? (If it applies)

System:
    OS: macOS 12.3
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.13.1 - /private/var/folders/0q/pjz2hj3j7qj1skllnnpgxd4w0000gn/T/xfs-f74f0936/node
    Yarn: 3.2.3 - /private/var/folders/0q/pjz2hj3j7qj1skllnnpgxd4w0000gn/T/xfs-f74f0936/yarn
  Databases:
    SQLite: 3.36.0 - /usr/local/bin/sqlite3
  Browsers:
    Chrome: 106.0.5249.119
    Safari: 15.4
  npmPackages:
    @redwoodjs/core: 3.2.0 => 3.2.0

Are you interested in working on this?

  • I'm interested in working on this
@lunchbreakdev lunchbreakdev added the bug/needs-info More information is needed for reproduction label Oct 14, 2022
@redwoodjs-bot redwoodjs-bot bot moved this to Triage in Main Oct 14, 2022
@redwoodjs-bot redwoodjs-bot bot added this to Main Oct 14, 2022
@noire-munich noire-munich removed their assignment Oct 15, 2022
@noire-munich
Copy link
Collaborator

Thank you for taking the time to report this @morganmspencer , we'll look into it.
Can you provide a repo?

@lunchbreakdev
Copy link
Contributor Author

Sure! Got one here that I created with the steps above: https://github.com/morganmspencer/sb-auth-test

@RyannosaurusRex
Copy link
Contributor

I actually ran into a similar issue recently outside of redwood because @supabase/supabase-js 2.0 just landed and has several breaking changes.

I checked out the template in redwood and it looks like everything internally references and depends on 1.36.0.

When I go and update the package.json and force it down to 1.36.0 in my redwood app after initializing supabase, this error goes away (because dependencies get back in sync).

Not sure what other providers do, if they lock the version when you run a setup/initialization like this or what, but seems like the answer is either: 1) lock the @supabase/supabase-js version to 1.36.0 or 2) to update the templates and provider to 2.0.

@lunchbreakdev
Copy link
Contributor Author

Awesome find @RyannosaurusRex! Will downgrade for now in my app but definitely seems worth a fix in the templater

@dthyresson
Copy link
Contributor

Implemented in #7719

@github-project-automation github-project-automation bot moved this from Triage to Done in Main Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction topic/auth
Projects
Status: Done
Development

No branches or pull requests

4 participants