How to consume an authenticated service with Oauth2 on Nodejs?

Asked

Viewed 394 times

0

I am trying to implement Oauth2 authentication in a REST Nodejs application with Express + Passport. My REST Nodejs application will be an API for a service to be consumed by a mobile application, which I am developing for Android.

In Oauth2 you have a Clientid and a Clientsecret, which in Apis/services with Facebook, Google, etc, you enter a "control panel" of the guys and create these parameters of Clientid and Clientsecret to insert in the mobile application (for example) that will access the API/service.

QUESTION 1: In my REST application, which will be accessed using Oauth2 authentication, how do I create Clientid and Clientsecret which will be inserted into my Android app?

QUESTION 2: These Clientid and Clientsecret parameters will always be the same on all Android devices running my app while accessing this REST service/API or each device has to have its Clientid and Clientsecret?

1 answer

-1

You can create Clientid and Clientsecret in the control panel. Then you have to redirect the user to a URL to get an Authorization code.

More information: Google Cloud - Authenticate Users

Browser other questions tagged

You are not signed in. Login or sign up in order to post.