Identityserver4: Is it possible to use Identity server 4 to secure nodejs web api?

Created on 20 Jan 2017  路  5Comments  路  Source: IdentityServer/IdentityServer4

I am running identity server app and another web api app using dotnet core and I am securing the api using identity server and everything is perfect, I would like to use Identity server 4 to secure nodejs web api is that possible?
and if yes is there any example or library that I can use?
Thanks in advance

question

Most helpful comment

Yes. For node.js samples, check the OpenID Connect working group's list of libraries: https://openid.net/developers/libraries/

All 5 comments

Yes. For node.js samples, check the OpenID Connect working group's list of libraries: https://openid.net/developers/libraries/

I am in the same boat here. I have a production IDS4 and Web Application with dotnet core Web API running. But we have an outside developer who wants to build an Node.js api for a mobile app. I followed the link that @brockallen provided and only found node idp provider implementations.
@mohamed-elsabagh have you found a way to secure your node api?

Well I am not sure if this is the best answer but what you can do is build your own authentication module it should be very simple. You can get jwt decoder library and extract the bearer token from the header of the requests and then authenticate this token with the identity server application and once you find it's an authenticated token then decode it using the jwt decoder to get required info I am not on my PC but once I am back I could point some useful libraries for you. It's also worth to have look at passport node library.

yes, you can by using passport-openidconnect .

    "openid": {
    "module" : "passport-openidconnect",
    "porvider" : "openid",
    "issuer" : "https://ip",
    "authorizationURL": "https://ip/connect/authorize",
    "tokenURL": "https://ip/connect/token",
    "userInfoURL": "https://ip/connect/userinfo",
    "clientID": "clientid",
    "clientSecret": "clientsecret",
    "callbackURL": "/auth/openid/callback", 
    "authPath": "/auth/openid",
    "successRedirect": "/",
    "failureRedirect": "/",
    "session": "true",
    "scope":"openid profile email"
    }

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

user1336 picture user1336  路  3Comments

eshorgan picture eshorgan  路  3Comments

leksim picture leksim  路  3Comments

createroftheearth picture createroftheearth  路  3Comments

brockallen picture brockallen  路  3Comments