Back

Facing issue while creating Oauth2 client

  • 0
  • Android
  • Auth
Rohit Gupta
1 Jul, 2024, 16:28

I have created this function 'signInWithGoogle()' in Repository class but to initialise the Oauth client i have to pass an activity, I have passed my MainActivity but this code is not following the mvvm rules because there should be no direct connection of logic layer with Ui layer

Any suggestion

TL;DR
Developers facing issue while creating OAuth2 client. Function 'signInWithGoogle()' in Repository class requires passing an activity to initialize OAuth client, breaking MVVM rules. Suggestion: Avoid direct connection of logic layer with UI layer.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more