Help for using @hono/auth-js with React Native (Expo)
I am trying to integrate with react native.
I have exposed the api ends but I can't figure out how to send a request for login.
I need your help. The documentation is not clear at all and the example only works on nextjs.
import { makeRedirectUri } from "expo-auth-session";
import * as Browser from "expo-web-browser";
const signIn = async () => {
const redirectTo = makeRedirectUri();
const signInUrl = `http://localhost:3000/api/auth/signin/google`;
const result = await Browser.openAuthSessionAsync(signInUrl,redirectTo);
console.log(result);
};
in addition, normally when I send a get request here, shouldn't the http://localhost:3000/api/auth/signin/google login page come up? 400 Bad Request is returned.
My id and secrets are correct because they work in my @convex-dev/auth setup. (Again, a library built on authjs)
https://labs.convex.dev/auth
@hasanaktas login page resides on http://localhost:3000/api/auth/signin you are using provider endpoint which is used for post request.
@divyam234
Unfortunately, I couldn't solve it. I tried many scenarios of post or get request but did not get any results. Only Google and Apple login was required. I integrate it as native and provide validation myself. Then I generate the access tokens myself.
This library needs to be documented properly.
@hasanaktas goto https://next-auth-hono-react.pages.dev/api/auth/signin check this demo project you can see github login page.
Did you set up basePath or AUTH_URL? I had some trouble with missing configs before.