Tmeister / wp-api-jwt-auth

A simple plugin to add JSON Web Token (JWT) Authentication to WP REST API
GNU General Public License v2.0
560 stars 161 forks source link

How to get UID for Firebase Custom Authentication #11

Closed Jan-Ole closed 8 years ago

Jan-Ole commented 8 years ago

I just stumbled over this plugin very recently and immediately wanted to try out how to authenticate a wordpress user in Firebase using Custom Authentication. So far everything is good. The http.post is returning the response including the token. But the returned response doesn't include a UID.

{"auth":null,"expires":1454333131,"token":"eyJ0eXAiOiJKV1QiLCJhbG[...]","uid":null,"provider":"custom"}

can someone explain to me how I get the uid? Is it generated by Firebase automatically or is it included in the token? Do I have to change something in the "class-jet-auth-public.php" file to modify the $token?

In the end I want this to use Firebase and Firechat to authenticate a user with his Wordpress user name and password,

Tmeister commented 8 years ago

Looks like you are confused.

This plugin allows you to login to your WordPress install via JWT (token). Is not intent to work with firebase or any other provider just with your WordPress install.