Questions tagged [php-jwt]

A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to RFC 7519.

A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to RFC 7519.

This is used by Firebase for custom authentication token solutions.

21 questions
9
votes
1 answer

How to populate `identifier` and `providers` in Firebase custom authentication?

I'm authenticating my users on my web service and then creating Firebase custom token via php-jwt: // Requires: composer require firebase/php-jwt use Firebase\JWT\JWT; // Get your service account's email address and private key from the JSON key…
Rob
  • 415,655
  • 72
  • 787
  • 1,044
4
votes
1 answer

Object of type Illuminate\Auth\AuthManager is not callable

As part of API development, I use Laravel 9 and use "php-open-source-saver/jwt-auth" package for authentication without tokens. The API works fine, but I get an error when I add the following line to the controller $this->middleware('auth:api',…
3
votes
2 answers

Unable to decode JWT tokens PHP

I tried to decode the given token with the code below. The key is supposed to be base64 encoded. However when I attempt to decode it tells me I have invalid signature. The token is generated from a system using Java and I have to decode it in…
Ayaskant Mishra
  • 439
  • 1
  • 3
  • 10
3
votes
1 answer

How to select valid keys from JWK key set for apple login token verification?

I am trying to validate apple identityToken using API. I am using the firebase/php-jwt library. I have done the below code. $access_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; $auth_keys =…
Sohil Sardhara
  • 133
  • 1
  • 13
2
votes
1 answer

firebase/php-jwt refresh token generation and revalidation

I am using the firebase/php-jwt library to authenticate users, I am successfully able to send the access-token, but how can I send a refresh token and create a way to revalidate the refresh token after its expiry
HOSENUR
  • 305
  • 3
  • 12
2
votes
0 answers

PHP JWT - Returns Null After Sometime

I have tried to implement JWT into my code for authentication. And it seems to work fine for sometime, and then it fails and returns null. And I am unable to figure out what is returning the null. JWT Files…
Saad Bashir
  • 4,341
  • 8
  • 30
  • 60
2
votes
1 answer

JWT token generation for apple api in php

I am trying to generate JWT token for apple connect API (to get sales report) in php. i tried this format (using firebase/php-jwt) $Private_key = file_get_contents('AuthKey_XYZ.p8'); $Issuer_ID = 'XYZ'; $Key_ID = 'ZDJ'; $data = [ 'iss' =>…
1
vote
1 answer

Epic on FHIR - PHP-JWT

I am trying to get the jwt token, but i am getting errors everytime with everything that i try. Below are th things that i have tried. I do get the jwt-token without the package but when i use the jwt.io to check the signature verification,it fails…
ternary
  • 41
  • 4
1
vote
1 answer

Error: Cannot handle token prior to 2022-11-25T22:41:29+0530

my server timezone is London and we are in Indian standard Time, everything works fine, except when the jwt and refresh token both expires, I have a scenario where I have to generate a new refresh token with 1 hr validity and supply for the final…
1
vote
1 answer

Pre-scheduling Zoom meeting doesn't create meeting at the time which is supposed? How can I fix it?

The problem is that, Zoom creates meeting but not in the correct time as I am expecting it to be: I have tried changing timezones in api.php as I have suspected that creates a problem, but seems like it isn't that. Here, I will elaborate how things…
smack857
  • 45
  • 6
1
vote
1 answer

How to call a class from vendor folder when using a composer?

I am investigating jwt token examples from this link - https://github.com/firebase/php-jwt So i run: composer require firebase/php-jwt And now i have new files and folders in my root directory of my site: vendor, composer.json and composer.lock.…
creators
  • 179
  • 8
1
vote
2 answers

Firebase auth with custom token from php

I have a PHP application and I am trying to generate a token to authenticate users so that they can access Firebase from the browser. I have generated a private key from service account in Firebase console and I use the firebase/php-jwt library.…
leandro_rm
  • 11
  • 2
1
vote
0 answers

PHP JWT Expiry Issue

I am new to JWT so apologies in advance. I am using php-jwt…
Saad Bashir
  • 4,341
  • 8
  • 30
  • 60
1
vote
0 answers

Angular php-jwt token cleared on page navigation

I'm having issues with my application, I used php-jwt JSON Web Token Authentication in my angular 9 apps and the token works fine when I'm not redirecting to successful page after login. when redirecting to the dashboard after login the token is set…
Iamgisnet
  • 171
  • 3
  • 3
  • 12
0
votes
0 answers

how to sign request in php with jwt by following the instructions below?

Client error: POST https://apisandbox.swissmoney.com/api/integration/v1/company-profiles resulted in a 401 Unauthorized response Can anyone help on this, i tried with myselft but was unsuccessull. i'm sending over here all the instructions if anyone…
1
2