#[CLOSED] Test user credentials in Appwrite

85 messages · Page 1 of 1 (latest)

wooden depot
#

in appwrite cloud?

marble jay
wooden depot
#

when you submit app in google play store , we have to provide a account so that they can watch our app , in mobile authentication with otp , how we will pass any my mobile number with reusable fixed otp so that they can login without asking me for otp . like firebase give this feature . you can set any fixed otp to any number . How will i achieve this in appwrite.

marsh goblet
#

Why don't you simply create one and provide them with the login details?

neon hatch
wooden depot
#

i have only mobile with otp login system , so i have to give mobile number and fixed otp

#

because my app get rejected because of this

#

we have to give more login method to achieve this?

limber pebble
#

I used an app with login in with OTP only

#

Just provide a note that you can use any phone and login will be created

#

I passed both apple and Google Play logins

wooden depot
#

yes you r right

#

but my app rejected before just because any user can not access my paid content , and google play console account wants a login credential that can access all paid content without purchasing it , for this i have to give a phone in which all content should show without any purchase.

neon hatch
#

You could just give a code

#

A referrals code

wooden depot
#

by referal code i have to make such system so that by that code content is free, right?

idle remnant
#

you can just use a function for the app's auth process, instead of directly using createPhoneSession.

In the function, check if the number input by the user is something like 111-111-111. If it is, accept the 1234 otp, and create a session for that user

#

If the number is not the preset one, just run the normal phone auth flow

#

Not too tough to implement

neon hatch
wooden depot
wooden depot
idle remnant
wooden depot
#

and i will suggest appwrite to give this feature in future , because its compulsary for every app who use mobile auth , like firebase

idle remnant
#

it's just a simple check. if it's the test number, accept the fixed otp, and create a session .

if it isn't fixed number, exit the function

#

it should add hardly 20-40ms which is not at all noticeable

wooden depot
#

yes but if you think about 10k user login per day , it will cost noticable extra bandwidth by running this function.

idle remnant
#

why?

#

those 10k users don't even need to use the functio

#

maybe i phrase it wrong

#

see

#

in your code, when the user clicks the login button after inputting their number, a function is called right?

#

a local function, not an appwrite function

wooden depot
#

so for this i have to make it in client side?

idle remnant
#

in this local function, you must be sending the phone number to createPhoneVerification right?

#

Instead of directly doing this, just check if the entered number is your test number

wooden depot
#

i was thinking about cloudfunction

idle remnant
#

if it is, move them to the next screen and ask for otp, and accept the preset otp

#

if the number is not the test number, do the actual verification

idle remnant
wooden depot
#

but then any body can see this phone and preset otp and access all paid content to free

wooden depot
idle remnant
#

You can just block the number after your app is published to play store

#

there's a Block account button in the user's settings

wooden depot
#

i am creating application from 3 years , and i show google does not just review one time , it checks many time , even if my app is not live , so if i delete , my app will be rejected

#

this problem i get many times , before firebase

wooden depot
idle remnant
#

okay

#

then how about this

#

instead of doing all the logic in the local function, just check if the number is a test number. If it is, create the session with OTP in your cloud function

#

This way, your OTP will not be visible on the client side.

#

if the number isn't a test number, do the normal flow.

#

Are you using flutter or java/kotlin?

#

Regardless of the framework, are you familiar with tree-shaking?

wooden depot
#

i used kotlin and flutter , but right now my app is in kotlin

wooden depot
idle remnant
#

This is a very common practice in mobile development. Read up on it

wooden depot
idle remnant
wooden depot
idle remnant
wooden depot
#

i dont know , but reverse engineer can do it

idle remnant
#

Shubham it seems like you're trying to acheive the impossible.

wooden depot
idle remnant
#

Hacking is always a possibility

#

An app or website is never 100% secure

#

It's just harder to get into

wooden depot
idle remnant
#

So you shouldn't be looking to do this - make hacking impossible

wooden depot
#

but its my work to atleast check all , that i can think its easy

idle remnant
wooden depot
idle remnant
#

The mthod I suggested, of sending the mobile number and and otp on cloud function is as good as it can get

#

At least for now.

wooden depot
wooden depot
#

Actually i have planned to move completely from firebase and django to appwrite

#

so in migrating , i have lots of problem , and i have to ask every question