07-17-2019 09:51
07-17-2019 09:51
Hello,
I am developing app with ReactNative.
I've added Fitbit login screen of Authorization Code Grant Flow by using React Native WebView
like this
https://support.vida.com/hc/article_attachments/360032029093/IMG_3555.PNG
But there is problem about Facebook login and Google login.
Problem:
After success of the Facebook login or Google login, they don't redirect to former Fitbit login screen as the above image, and I got white blank screen instead.
I looked into this problem, and I found GET method for redirect after login.
I don't know why this GET cannot redirect correctly.
like this
https://accounts.fitbit.com/torii/redirect.html#state=PKoKfoRJYcIAlD1n&access_token=ya29.GmBIByfp3JK-ghjAW27eDgzG6PLFr4qjGhxdhBg9BoJeIssFO9rpE4y6Wg-y-89pEthc8oH0xDMuTq3KZAb8x2amr1TdYIn80pCno8HMqRaJ3LwXX16TtPVVF7RmSaQDyvI&token_type=Bearer&expires_in=3600&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6Ijg0ZjI5NGM0NTE2MDA4OGQwNzlmZWU2ODEzOGY1MjEzM2QzZTIyOGMiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiNjI1NTg1NTMyODc3LW01dGgyMjEzZG5xcTZwNzIyZXNxN2hia2F2cmxpOXNkLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiNjI1NTg1NTMyODc3LW01dGgyMjEzZG5xcTZwNzIyZXNxN2hia2F2cmxpOXNkLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTA5MjMzMTE5MTg5NTQyOTAzMjQ4IiwiZW1haWwiOiJzeW5jLmhlYWx0aC5hcHBAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJNOVh1T0h0Rmx0OXgtbjVuMFZlUmxnIiwiaWF0IjoxNTYzMzgxNTgyLCJleHAiOjE1NjMzODUxODIsImp0aSI6ImQ1NjlkYjNiZmNmNzYzNjQwYTM2OWU2NGJiNDJmMjlmZTM2Mzc0NmQifQ.G-76Wc0O_EF_V6Ufh6vVR0QJcWxUCEC5Hcerxpn_HBcgwTyDRB4d6f3L13i6P6BaoPPMBm9FE5bgXR_ubu8Al8B-DxEgp4pO7Q2YAwYAajWheq78ltLRW88Y7lXVYu9kpSA3aU0uJal4TLNuit5k10W5vzzNjIVSjHXKKU9tP5vcScubswMKsubrHP0uibejoZIQmoGUR9uxdW4EVEAQz5hIZP8GhBQUf6EB15Y7_bsPL6z5Q9HFFAbjCGomgGe2Xq2hqohAefnkIj0ZB8LWrSeFNIbv8jwgvMHH2p-n5SURBTeVV85_ZUrjUrMOZE-AH96tuqMxQYBg9Lc3OsojWw&authuser=0&session_state=93d9ddf863e37d08687e7810ff55a9db9ebce530..0a42&prompt=none
Could you help me to solve this problem?
07-17-2019 13:27
07-17-2019 13:27
Hi @dbpr,
Sorry to hear that you are coming across this issue, and I'll be happy to assist.
We no longer support Google/Facebook login through the oAuth 2.0 flow, as mentioned in this thread: https://community.fitbit.com/t5/Web-API-Development/API-OAuth-login-using-Facebook-or-Google/m-p/184...
I hope this helps! Let me know if you have any other questions.
07-17-2019 17:58
07-17-2019 17:58
Thank you, @JohnFitbit
I checked the thread and understand that Fitbit no longer support Google/Facebook login.
But I can still see the Google/Facebook login form as above image when I use Authorization Code Grant Flow like this
https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=22942C&redirect_uri=http%3A%2F%2Fexample.com%2Ffitbit_auth&scope=activity%20nutrition%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight
What should I do to remove Google/Facebook login from Fitbit sign-in screen with Authorization Code Grant Flow.
07-24-2019 11:08
07-24-2019 11:08
Hi @dbpr,
After taking another look at your original post, I noticed that you were using React Native WebView. Please know that the use of WebView is actually prohibited in the Authorization flow.
See: https://dev.fitbit.com/build/reference/web-api/oauth2/#obtaining-consent
I hope this helps! Let me know if you have any other questions.