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

Unable to sign-in in tauri app #4725

Open
4 tasks done
ryansteil-pl opened this issue Dec 6, 2024 · 2 comments
Open
4 tasks done

Unable to sign-in in tauri app #4725

ryansteil-pl opened this issue Dec 6, 2024 · 2 comments
Labels
needs-triage A ticket that needs to be triaged by a team member

Comments

@ryansteil-pl
Copy link

ryansteil-pl commented Dec 6, 2024

Preliminary Checks

Reproduction

https://github.com/ryansteil-pl/clerk-nextjs-tauri-example

Publishable key

pk_test_Y29ycmVjdC1sZW11ci00Ni5jbGVyay5hY2NvdW50cy5kZXYk

Description

I'm using Clerk from within a tauri app.

When building for production, I'm not able to sign-in.

Screenshot 2024-12-05 at 9 54 55 PM

I have a hosted site on my primary domain that is currently functional (allows sign ups, sign ins, etc.). I have updated my instance settings with allowed_origins set to ["tauri://localhost"]

In the example repo above, I am passing

<ClerkProvider
  allowedRedirectProtocols={["tauri:"]}
  clerkJSVersion="5.39.0"
  signInUrl="/sign-in"
  {...pageProps}
>
  <Component {...pageProps} />
</ClerkProvider>

What am I missing? I have also attempted to use the primary domain sign in page directly, but I'm not able to redirect back to tauri://localhost.

Environment

System:
  OS: macOS 15.2
  CPU: (10) arm64 Apple M1 Max
  Memory: 7.98 GB / 64.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
  Yarn: 1.22.21 - /opt/homebrew/bin/yarn
  npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
  pnpm: 9.14.2 - ~/Library/pnpm/pnpm
  bun: 1.0.27 - /opt/homebrew/bin/bun
Browsers:
  Chrome: 131.0.6778.109
  Safari: 18.2
npmPackages:
  @clerk/nextjs: ^6.7.1 => 6.7.1 
  @tauri-apps/cli: ^2.1.0 => 2.1.0 
  @tauri-apps/plugin-shell: ~2 => 2.0.1 
  @types/node: ^20 => 20.17.9 
  @types/react: ^18 => 18.3.14 
  @types/react-dom: ^18 => 18.3.2 
  eslint: ^8 => 8.57.1 
  eslint-config-next: 15.0.3 => 15.0.3 
  next: 15.0.3 => 15.0.3 
  postcss: ^8 => 8.4.49 
  react: 19.0.0-rc-66855b96-20241106 => 19.0.0-rc-66855b96-20241106 
  react-dom: 19.0.0-rc-66855b96-20241106 => 19.0.0-rc-66855b96-20241106 
  tailwindcss: ^3.4.1 => 3.4.16 
  typescript: ^5 => 5.7.2
@ryansteil-pl ryansteil-pl added the needs-triage A ticket that needs to be triaged by a team member label Dec 6, 2024
@ryansteil-pl ryansteil-pl changed the title Unable to login in tauri app Unable to sign-in in tauri app Dec 6, 2024
@ryansteil-pl
Copy link
Author

I think at least one issue is the inability to set cookies: tauri-apps/tauri#2604

It's looking like I will have to create a custom SDK for this use case. Is there anything that I'm missing?

@ryansteil-pl
Copy link
Author

Actually, the best thing to do for now might be to Use Clerk as an OAuth 2 Provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage A ticket that needs to be triaged by a team member
Projects
None yet
Development

No branches or pull requests

1 participant