Skip to content

Capacitor Sign in Redirect Url Problem #164

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

Open
hasanaktas opened this issue Feb 11, 2025 · 1 comment
Open

Capacitor Sign in Redirect Url Problem #164

hasanaktas opened this issue Feb 11, 2025 · 1 comment

Comments

@hasanaktas
Copy link

hi
When we run the login function for web in convex-auth, it automatically opens the url in the browser, but for react native, redirect url return and we open that url in the app browser ourselves. (Example: Expo WebBrowser.openAuthSessionAsync)

I need to apply the flow in react native in a capacitor-based application, but since capacitor is web-based, it redirects directly to the login. Can't we get the redirect url manually and process it ourselves, as in react native?

  const { redirect } = await signIn("google", {
      redirectTo: "http://localhost:3100",
    });

This function never redirects on the web.
I want

  1. Not to automatically redirect to the login page
  2. Take the redirect url and open it in the capacitor browser https://capacitorjs.com/docs/apis/browser
@hasanaktas
Copy link
Author

Can someone help me with this?

I can't find a solution. There needs to be a mechanism that will force the signIn function to return a redirect url instead of automatically opening the login page on the web like in React Native.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant