auth0 / wordpress

WordPress Plugin for Auth0 Authentication
https://auth0.com/docs/cms/wordpress
MIT License
152 stars 96 forks source link

How do I pass the JWT to firebase from wp-auth0 #108

Closed beatelite closed 8 years ago

beatelite commented 8 years ago

I get that wp-auth authenticates my wp users into my install (and in auth0). What I am missing is instructions on how to pass that info into firebase.

I have followed this tutorial https://www.firebase.com/blog/2014-06-05-auth0-guest-blog.html

I have firebase and auth0 connected via a secret. Howeves, I'm stuck on where it says "obtain the firebase token".

The tricky part is that i'm building an angularjs app on top of wordpress. The app is only available to authenticated wp users so I'm not clear on where and how to obtain the firebase token for my users. Do I do it via this plugin? do I it via the JWT auth0 addon? Should I do it directly in the angular code?

Really appreciate any suggestions or guidance. Happy holidays!

glena commented 8 years ago

You will need to hook to the login action go get the user id_token (the user jwt) and call the delegation endpoint with it to exchange for the firebase token (step 1. Obtaining Firebase tokens).