Auth0 Home Blog Docs

Can I Use HWIO For The Initial Flow And Then The JWT-Auth-Bundle To Process The "open_id" Portion


#1

Sorry, if this seems like a ignorant question, but this is the first time doing an oauth2/openid project. I have already read and completed the quick start for symfony, but I am now unsure how to create the user provider which if I understand correctly needs to decode the “open_id” JWT token once it gets validation. Any direction/resources/comments or even full fledged symfony projects using auth0 would be greatly appreciated as I try to figure this out. Based upon I am reading it seems like The JWT-Auth-Bundle seems to have most of the logic that I need, but I am not sure if I am moving in the right direction.

Thank you.


#2

HWIO has three user providers built in:

  1. one if you don’t need to save anything to the database
  2. one if you do want to save the user to the database
  3. one for users of the FOSUserBundle

Depending on your use case, picking one of the three should help you get started. An important question right off the bat: what data do you want to get out of Auth0? Just the usual email, username type stuff? Or do you add more through rules?

I’m not at work right now, so can’t show you the code to support our use case (number three) right now. So, I’ll get back on this ASAP.


#3

Hi thijmen96,

It is really just the really standard stuff the profile info I don’t expect to have custom claims or rules and I was expecting to use the users id for some authorization logic, that is, I will be using it to allow users to do some crud actions onto a table that only they have access to . So I think option 1 or 3 makes the most sense to me for now.

Thanks you for answering my question it is really appreciated,