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.