​

I'm trying to use Clerk for authentication in an upcoming Android application, with Supabase as the database. Honestly, I chose Clerk because I just wanted to try it out and see how it feels,literally don't ask me why ( not Supabase Auth) I can feel it in my bonesπŸ˜‚

I'm using the native Android SDK and the prebuilt AuthView, rather than building the authentication UI myself.

The problem I'm running into is with the default signInOrUp behavior.

As I understand it, AuthView() is supposed to automatically determine whether the user should sign in or sign up. That's exactly what I want. I don't want to manually decide which screen to show because I obviously don't know whether a new user exists before they've entered their identifier.

However, when I test this with a completely fresh Clerk instance where there are currently zero users, AuthView() still opens with the Sign In flow.

I've tested Google authentication several times, and I keep getting sent through the Google authentication flow and then back to the AuthView without a user being created. The Clerk dashboard still shows zero users.

I also tried explicitly forcing the view into sign-up mode, and that does work. The problem is that obviously I can't leave it permanently in sign-up mode because once an existing user signs in, I need the normal sign-in flow when they return later.

So I feel like I'm stuck between:

β™§

SignInOrUp β†’ starts with Sign In

signUp β†’ works for a new user, but isn't appropriate permanently

β™§

What I'm trying to understand is:

How is signInOrUp actually supposed to determine whether a user is new or existing in the native Android AuthView?

Is there some configuration I'm missing in the Clerk Dashboard or native Android setup?

I'm using the current Clerk Android prebuilt UI rather than the older custom-flow documentation.

Has anyone successfully tested a completely fresh Clerk instance with AuthView() and Google, where the user doesn't exist yet?

Any explanation of how this is supposed to work under the hood would be appreciated.

I'm using version 1.1.3

submitted by /u/Indianathe
[link] [comments]