Setting up firebase v3 custom auth with php

后端 未结 5 694
囚心锁ツ
囚心锁ツ 2020-12-31 21:40

I\'m trying to set up custom auth with the new firebase sdk from google following those guidelines : https://firebase.google.com/docs/auth/server#use_a_jwt_library
In t

5条回答
  •  失恋的感觉
    2020-12-31 22:14

    instead of

    $key = 'giant_key_goes_here';
    token = JWT::encode($payload, $key, 'RS256');
    

    use

    define("FIREBASE_PRIVATE_KEY","giant_key_goes_here");
    token = JWT::encode($payload, FIREBASE_PRIVATE_KEY, 'RS256');
    

提交回复
热议问题