Trying to achieve Firebase authentication using customToken.
Getting error while doing below:
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("path to file") //different in actual
.build();
FirebaseApp.initializeApp(options);
It says can not resolve setCredentials() and after this when I'm trying to creat token is gives same error:
FirebaseAuth.getInstance().createCustomToken(uid);
Searched all over the net cant find solution please help
Dependencies used are as below:
implementation 'com.google.firebase:firebase-core:11.0.4'
implementation 'com.google.firebase:firebase-messaging:11.0.4'
implementation 'com.google.firebase:firebase-appindexing:11.0.4'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-storage:11.0.4'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.google.firebase:firebase-perf:16.0.0'
implementation 'com.firebase:firebase-client-android:2.5.2+'
implementation 'com.firebase:firebase-client-android:2.5.2+'
implementation 'com.google.android.gms:play-services-analytics:11.0.4'
implementation 'com.google.android.gms:play-services-location:11.0.4'
implementation 'com.google.android.gms:play-services-auth:11.0.4'