Coder Social home page Coder Social logo

Angular2 Hybrid Flow about node-openid-client HOT 4 CLOSED

panva avatar panva commented on July 21, 2024
Angular2 Hybrid Flow

from node-openid-client.

Comments (4)

panva avatar panva commented on July 21, 2024

Hey @gulatiy, do you have any particular reason for using Hybrid? I can certainly help or advise but would need more details and insights to do it properly.

from node-openid-client.

gulatiy avatar gulatiy commented on July 21, 2024

We are using Hybrid Flow to use the features like refresh tokens and it is a combination of both the flows also it is the part of our requirements.
We are building a SPA using Angular 2 and we need some advice setting up this repository with angular 2.

from node-openid-client.

panva avatar panva commented on July 21, 2024

Hey @gulatiy, that's not really more descriptive ;) But let's see how far we can get.

It is actually rather easy. Basically you must collect the authorization callback params (serialized in fragment on your redirect_uri) and get them (via any means) to your node backend, where you will run the usual #authorizationCallback() function of your client. This will run the code flow for the received code as well as validate the tokens in a usual fashion.

It is essential that you forward all received parameters to your backend for validation using openid-client because the id_token may contain claims which can only be validated if the other token values are also present.

If you are using the tokens received in fragment in your SPA right away (before waiting for the validation response from your backend) then please beware that you MUST validate them yourself before use.

If in fact you are waiting for the backend to respond then i see no need for a hybrid flow. You may as well do standard code flow only with a response_mode=fragment.

from node-openid-client.

gulatiy avatar gulatiy commented on July 21, 2024

Hi @panva I am a newbie to the security so maybe i was a little brief, thanks for this amazing reply.

I now understand the flow of the process, thanks for your time. :-)

from node-openid-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.