Firebase 'createCustomToken' not recognized in Android

Viewed 1072

I'm implementing "login with custom token". I found this snippet of code in the Firebase documentation.

firebaseAuth.createCustomToken(uid)
                            .addOnSuccessListener(new OnSuccessListener<String>() {
                                @Override
                                public void onSuccess(String customToken) {
                                    // Send token back to client
                                }
                            });

I have put this code inside the 'onCreate' method and 'createCustomToken' is not being recognized: enter image description here

Any idea what I'm doing wrong? Thanks in advance!

1 Answers
Related