optimistic-gold
optimistic-goldβ€’15mo ago

HOW TO SOLVE WHEN LOGIN SUCCESS BUT DON'T WANT TO MOVE TO NEXT ACTIVITY

I'm creating a login activity but after successful login why doesn't it move to the next activity? is there something wrong with my code? Notes : i am using retrofit for login activity
7 Replies
kapa.ai
kapa.aiβ€’15mo ago
Hey @internshipSTUDENT! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
kapa.ai
kapa.aiβ€’15mo ago
---------------------- It sounds like you are using the login method of the authProvider to handle authentication. If you don't want to redirect the user to another page after successful login, you can resolve the login method's Promise with false.
const authProvider: AuthProvider = {
...
login: () => {
...
return Promise.resolve(false);
}
}
const authProvider: AuthProvider = {
...
login: () => {
...
return Promise.resolve(false);
}
}
For more information, please refer to the Creating an authProvider (https://refine.dev/docs/tutorial/understanding-authprovider/create-authprovider) section of the Refine documentation. ----------------------
2. Create Auth Provider From Scratch | refine
This section will show you how to create an auth provider from scratch. We'll use mock data to be able to focus on the auth provider methods. When you understand the logic of auth provider, you can easly integrate third-party authentication services or your own custom auth provider which includes many possible strategies like JWT, OAuth, etc.
kapa.ai
kapa.aiβ€’15mo ago
Did kapa.ai help answer your question?
<@1083641336940466197> kapa.ai is still learning and improving, please let us how it did by reacting with a :thumbsup: or :thumbsdown:
foreign-sapphire
foreign-sapphireβ€’15mo ago
Hi, are you trying to open your refine app in Android WebView ?
optimistic-gold
optimistic-goldβ€’15mo ago
no, but I'm building a login activity app in android studio using retrofit to connect to a php mysql database I think I joined the wrong Discord server
foreign-sapphire
foreign-sapphireβ€’15mo ago
πŸ˜„ yeah, this is a refine server. its okay but, If you ask on servers related to android, probably you can get a faster answer.
optimistic-gold
optimistic-goldβ€’15mo ago
thanks alican , you are very kind...