clerk / javascript

Official Javascript repository for Clerk authentication
https://clerk.com
MIT License
981 stars 221 forks source link

Not a valid protocol - wails:// #3545

Closed pavelbinar closed 1 month ago

pavelbinar commented 1 month ago

Preliminary Checks

Reproduction

I believe the description is sufficient - let me know if not

Publishable key

pk_test_ZmFpci1ib2JjYXQtNjUuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

I am using `` after sign-up I am redirecting to /.

This was working fine untill recently when I start getting an error in the web console:

Clerk: Not a valid protocol. Redirecting to /

I run my web app in the context of https://wails.io/ that mean that my window.location = "wails://wails.localhost:34115"

It seems that the wails:// protocol is newly causing a problem. Here is probably the responsible code: https://github.com/clerk/javascript/blob/40eb63b28a8fac27387a0536f26547460bb4479c/packages/clerk-js/src/utils/windowNavigate.ts#L7

Environment

Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
  npmPackages:
    @clerk/clerk-react: ^4.30.3 => 4.30.3
jescalan commented 1 month ago

Thanks for bringing this up - it is a valid use case and we are looking into ways that we can allow custom protocols to be passed in here.

pavelbinar commented 1 month ago

Hi, thank you for confirming.

I think it might be a regression, because we had a working sign up and it just stopped working.

I know it is hard but can you please get me some estimate for fix. If you don't see it in any foreseeable future then we will need to find a workaround.

pavelbinar commented 1 month ago

Wow, a fix within hours 🎉 Thank you for giving it such priority.

Looking forward to seeing it in the release: ⌛ https://github.com/clerk/javascript/pull/3558