# \#php

**URL:** https://community.auth0.com/tag/php/330.md

[Latest](https://community.auth0.com/latest.md) · [Categories](https://community.auth0.com/categories.md) · [Tags](https://community.auth0.com/tags.md)

---

## [Really stuck on instantiating the Auth0 PHP SDK](https://community.auth0.com/t/really-stuck-on-instantiating-the-auth0-php-sdk/94582)

<div class="topic-metadata">

**Author:** [@acalpixca](https://community.auth0.com/u/acalpixca)\
**Replies:** 4\
**Last updated:** [June 8, 2023, 4:50am UTC](https://community.auth0.com/t/really-stuck-on-instantiating-the-auth0-php-sdk/94582 "2023-06-08T04:50:42Z")

</div>

Hi, just going crazy following this tutorial. https://auth0.com/docs/quickstart/backend/php/01-authorization#integrating-your-php-backend-api To cut a long story short, instantiating the SDK is not working for me. It t…

---

## [Migrating from PHP SDK 7 to 8 - session not persisting?](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028)

<div class="topic-metadata">

**Author:** [@ian.wild](https://community.auth0.com/u/ian.wild)\
**Replies:** 4\
**Last updated:** [February 2, 2023, 2:49pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028 "2023-02-02T14:49:29Z")

</div>

Hi to everyone! I’m currently (successfully) using version 7 of the Auth0 PHP SDK to implement single sign on. I’m using the Authentication class directly so that I can manage each step of the authentication flow. Once t…

---

## [PHP SDK Initialization - sessionStorage](https://community.auth0.com/t/php-sdk-initialization-sessionstorage/90454)

<div class="topic-metadata">

**Author:** [@auth0man](https://community.auth0.com/u/auth0man)\
**Replies:** 1\
**Last updated:** [October 14, 2022, 5:50am UTC](https://community.auth0.com/t/php-sdk-initialization-sessionstorage/90454 "2022-10-14T05:50:29Z")

</div>

Which SDK this is regarding: PHP SDK Version: 8.2.1 Platform Version: Ubuntu 20.04.5 LTS I don’t understand the SDK configuration process for using PHP session storage. $sessionStorage StoreInterface|null …

---

## [Real Management API docs for PHP SDK?](https://community.auth0.com/t/real-management-api-docs-for-php-sdk/91261)

<div class="topic-metadata">

**Author:** [@david29](https://community.auth0.com/u/david29)\
**Replies:** 4\
**Last updated:** [September 26, 2022, 8:56am UTC](https://community.auth0.com/t/real-management-api-docs-for-php-sdk/91261 "2022-09-26T08:56:34Z")

</div>

I can’t seem to find any usable documentation on using the Management API through the PHP SDK. I found a single example here: However, this is just for making an initial request. Isn’t there some sort of doc which sh…

---

## [Uncaught Error: Class "Auth0\\SDK\\..." not found](https://community.auth0.com/t/uncaught-error-class-auth0-sdk-not-found/85962)

<div class="topic-metadata">

**Author:** [@matigo](https://community.auth0.com/u/matigo)\
**Replies:** 7\
**Last updated:** [June 28, 2022, 4:38pm UTC](https://community.auth0.com/t/uncaught-error-class-auth0-sdk-not-found/85962 "2022-06-28T16:38:52Z")

</div>

Hi, Based on the instructions below, I am trying to add login to my PHP application using the Auth0 PHP-SDK: Despite trying endless methods and different examples found on web, I’m still getting the error - “Fatal er…

---

## [Adding metadata to user using management API](https://community.auth0.com/t/adding-metadata-to-user-using-management-api/84693)

<div class="topic-metadata">

**Author:** [@bird](https://community.auth0.com/u/bird)\
**Replies:** 1\
**Last updated:** [June 16, 2022, 5:43pm UTC](https://community.auth0.com/t/adding-metadata-to-user-using-management-api/84693 "2022-06-16T17:43:27Z")

</div>

I am currently having a slight issue with registering users via the API and I think it’s down to our Pre-User Registration flow. We currently have a Pre-User Registration flow that looks like this: /\*\* \* @param {Event…

---

## [In laravel-auth0, the SDK is not exposed, so how can we renew tokens?](https://community.auth0.com/t/in-laravel-auth0-the-sdk-is-not-exposed-so-how-can-we-renew-tokens/79798)

<div class="topic-metadata">

**Author:** [@chris-workinggears](https://community.auth0.com/u/chris-workinggears)\
**Replies:** 2\
**Last updated:** [March 16, 2022, 1:44pm UTC](https://community.auth0.com/t/in-laravel-auth0-the-sdk-is-not-exposed-so-how-can-we-renew-tokens/79798 "2022-03-16T13:44:25Z")

</div>

Please include the following information in your post: Which SDK this is regarding: e.g. auth0-node auth0/laravel-auth0 SDK Version: e.g. 2.29.0 6.5 Platform Version: e.g. Node 12.19.0 PHP8.1 Currently, a…

---

## [PHP Missing Code Error When Running 'api.access.deny'](https://community.auth0.com/t/php-missing-code-error-when-running-api-access-deny/75729)

<div class="topic-metadata">

**Author:** [@janik.driehaus](https://community.auth0.com/u/janik.driehaus)\
**Replies:** 1\
**Last updated:** [January 10, 2022, 3:42pm UTC](https://community.auth0.com/t/php-missing-code-error-when-running-api-access-deny/75729 "2022-01-10T15:42:16Z")

</div>

I encounter this error when adding an Action to the login Flow. If I remove the Action from the Flow, it works again. I’d love to know where I’m going wrong, as the aforementioned line in question is simply: Th…

---

## [Server closes when running PHP sample app](https://community.auth0.com/t/server-closes-when-running-php-sample-app/72994)

<div class="topic-metadata">

**Author:** [@janik.driehaus](https://community.auth0.com/u/janik.driehaus)\
**Replies:** 2\
**Last updated:** [January 3, 2022, 8:34am UTC](https://community.auth0.com/t/server-closes-when-running-php-sample-app/72994 "2022-01-03T08:34:00Z")

</div>

When executing either of the following composer run app php -S 127.0.0.1:3000 index.php Accessing this address in the browser returns a blank page. The output of the following commands upon execution is: composer…

---

## [Social Sign On not Persisting Session \[PHP Auth0 SDK\]](https://community.auth0.com/t/social-sign-on-not-persisting-session-php-auth0-sdk/73266)

<div class="topic-metadata">

**Author:** [@drewHolmes](https://community.auth0.com/u/drewHolmes)\
**Replies:** 14\
**Last updated:** [December 7, 2021, 9:13pm UTC](https://community.auth0.com/t/social-sign-on-not-persisting-session-php-auth0-sdk/73266 "2021-12-07T21:13:57Z")

</div>

Hey Auth0 Community! We’ve successfully implemented an Auth0 login flow using social sign-in exclusively but we’ve noticed an issue with sessions not persisting/keeping the user signed in. I was scrounging around the d…

---

## [(Programmatically) bypass the auth0 authentication](https://community.auth0.com/t/programmatically-bypass-the-auth0-authentication/70500)

<div class="topic-metadata">

**Author:** [@handikadwi7](https://community.auth0.com/u/handikadwi7)\
**Replies:** 1\
**Last updated:** [October 9, 2021, 12:44am UTC](https://community.auth0.com/t/programmatically-bypass-the-auth0-authentication/70500 "2021-10-09T00:44:48Z")

</div>

so here’s the thing I have two apps there is login button in the first app. If the button is clicked, the user will be automatically logged in to the second app and if the user logs himself out from the second app, he…

---

## [Implementation review](https://community.auth0.com/t/implementation-review/66161)

<div class="topic-metadata">

**Author:** [@stanley](https://community.auth0.com/u/stanley)\
**Replies:** 5\
**Last updated:** [July 16, 2021, 6:04pm UTC](https://community.auth0.com/t/implementation-review/66161 "2021-07-16T18:04:37Z")

</div>

Please include the following information in your post: Which SDK this is regarding: auth0-php SDK Version: 7.9.1 Platform Version: PHP 8 Code Snippets/Error Messages/Supporting Details/Screenshots: Hi all, I’m u…

---

## [PHP Guidance for user-metadata & user\_id](https://community.auth0.com/t/php-guidance-for-user-metadata-user-id/65396)

<div class="topic-metadata">

**Author:** [@KFDEV](https://community.auth0.com/u/KFDEV)\
**Replies:** 8\
**Last updated:** [July 6, 2021, 10:54am UTC](https://community.auth0.com/t/php-guidance-for-user-metadata-user-id/65396 "2021-07-06T10:54:59Z")

</div>

Hi all, I’m struggling a huge amount trying to use the PHP API, the github sample is extremely basic :frowning: So I can get a basic user back from the auth client after sign in $auth0-\>getUser() but this only has ba…

---

## [Redirect to the initial requested URL including Query parameters](https://community.auth0.com/t/redirect-to-the-initial-requested-url-including-query-parameters/60876)

<div class="topic-metadata">

**Author:** [@irtech](https://community.auth0.com/u/irtech)\
**Replies:** 2\
**Last updated:** [June 25, 2021, 6:59am UTC](https://community.auth0.com/t/redirect-to-the-initial-requested-url-including-query-parameters/60876 "2021-06-25T06:59:44Z")

</div>

I implemented the login of the application based on the provided vanilla PHP-SDK Sample which works like this: User tries to open a page of the application which is only accessible to logged in users, let’s say /home.p…

---

## [Unable to getUser() after logging into a PHP 7.4 Regular Application with a Subdomain](https://community.auth0.com/t/unable-to-getuser-after-logging-into-a-php-7-4-regular-application-with-a-subdomain/54768)

<div class="topic-metadata">

**Author:** [@ymonye](https://community.auth0.com/u/ymonye)\
**Replies:** 4\
**Last updated:** [December 17, 2020, 10:41am UTC](https://community.auth0.com/t/unable-to-getuser-after-logging-into-a-php-7-4-regular-application-with-a-subdomain/54768 "2020-12-17T10:41:03Z")

</div>

Hi all, I’m currently following the Quickstart PHP guide for setting up Auth0 for my website. Everything is run off an Apache/2.4.6 server with PHP 7.4, and I have a custom domain for my login. All dependencies were ins…

---

## [Which PHP JWT package is best to work with PHP version 5.6](https://community.auth0.com/t/which-php-jwt-package-is-best-to-work-with-php-version-5-6/53374)

<div class="topic-metadata">

**Author:** [@a2kmkoehler](https://community.auth0.com/u/a2kmkoehler)\
**Replies:** 0\
**Last updated:** [November 17, 2020, 4:16pm UTC](https://community.auth0.com/t/which-php-jwt-package-is-best-to-work-with-php-version-5-6/53374 "2020-11-17T16:16:01Z")

</div>

Which PHP JWT package is best to work with PHP version 5.6.

---

## [Editing the Error page in wordpress (wp-die)](https://community.auth0.com/t/editing-the-error-page-in-wordpress-wp-die/46256)

<div class="topic-metadata">

**Author:** [@Johannes](https://community.auth0.com/u/Johannes)\
**Replies:** 0\
**Last updated:** [July 14, 2020, 12:06pm UTC](https://community.auth0.com/t/editing-the-error-page-in-wordpress-wp-die/46256 "2020-07-14T12:06:12Z")

</div>

Hi! I’ve recently installed the Auth0 plugin for wordpress and have for a while been trying (with no luck ) to edit the error page when a user needs to verify their email. I have read the following post: In which the…

---

## [Validating the JWT token with database in php](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851)

<div class="topic-metadata">

**Author:** [@urajesh647](https://community.auth0.com/u/urajesh647)\
**Replies:** 1\
**Last updated:** [June 23, 2020, 4:47pm UTC](https://community.auth0.com/t/validating-the-jwt-token-with-database-in-php/44851 "2020-06-23T16:47:04Z")

</div>

Hi guys, I am new to JWT and I have been working with JWT authentication in php. Generated the token with JWT::encode and send it through header and decoded by JWT::decode method. My problem is that how can I validate th…

---

## [Using sample PHP code on iOS 12 -- Auth0 login page hangs](https://community.auth0.com/t/using-sample-php-code-on-ios-12-auth0-login-page-hangs/42777)

<div class="topic-metadata">

**Author:** [@HLR](https://community.auth0.com/u/HLR)\
**Replies:** 2\
**Last updated:** [May 15, 2020, 12:50pm UTC](https://community.auth0.com/t/using-sample-php-code-on-ios-12-auth0-login-page-hangs/42777 "2020-05-15T12:50:25Z")

</div>

Hello All, I have Auth0 working great with my PHP application with Google, Facebook, Twitter, Amazon and Apple. It all works really well, 50% of the time. But 50% of the time when I call the “$auth0-\>login();” call in…

---

## [2 diretores for validate](https://community.auth0.com/t/2-diretores-for-validate/41357)

<div class="topic-metadata">

**Author:** [@carcleo](https://community.auth0.com/u/carcleo)\
**Replies:** 1\
**Last updated:** [April 21, 2020, 9:05pm UTC](https://community.auth0.com/t/2-diretores-for-validate/41357 "2020-04-21T21:05:53Z")

</div>

I have the follows folders in my project: //here are the site/shopping administration site/admin site/admin/login //here are the place of clientes of shopping site/shopping site/dhopping/login if the client logg…

---

## [Laravel User Impersonation](https://community.auth0.com/t/laravel-user-impersonation/36171)

<div class="topic-metadata">

**Author:** [@stanley](https://community.auth0.com/u/stanley)\
**Replies:** 5\
**Last updated:** [January 15, 2020, 9:13pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171 "2020-01-15T21:13:55Z")

</div>

Hi, Laravel allows you to easily impersonate users using Auth::login($user). Since we implemented Auth0 for our users to login, we are no longer able to do this. After performing an Auth::login($user) and redirecting to…

---

## [Hello, i need help starting to use auth0, how do i go about it for php](https://community.auth0.com/t/hello-i-need-help-starting-to-use-auth0-how-do-i-go-about-it-for-php/24966)

<div class="topic-metadata">

**Author:** [@babalolaferanmi8](https://community.auth0.com/u/babalolaferanmi8)\
**Replies:** 15\
**Last updated:** [May 14, 2019, 9:57pm UTC](https://community.auth0.com/t/hello-i-need-help-starting-to-use-auth0-how-do-i-go-about-it-for-php/24966 "2019-05-14T21:57:57Z")

</div>

I want to start using auth0 for auth0 with php but i cant seems to get a hold of it, please how do i go about it.

---

## [What is the difference between auth0-php sdk and auth0 sdk for web](https://community.auth0.com/t/what-is-the-difference-between-auth0-php-sdk-and-auth0-sdk-for-web/24979)

<div class="topic-metadata">

**Author:** [@babalolaferanmi8](https://community.auth0.com/u/babalolaferanmi8)\
**Replies:** 0\
**Last updated:** [May 8, 2019, 1:24pm UTC](https://community.auth0.com/t/what-is-the-difference-between-auth0-php-sdk-and-auth0-sdk-for-web/24979 "2019-05-08T13:24:06Z")

</div>

Hello I’ve been trying to use auth0 with my php web app login UI, but i don’t know which way to go, will auth0-php sdk do the work or auth0 sdk for web, i also came across custom signup, please i need help, because am st…

---

## [PHP back-end and jquery front end](https://community.auth0.com/t/php-back-end-and-jquery-front-end/22801)

<div class="topic-metadata">

**Author:** [@roel1](https://community.auth0.com/u/roel1)\
**Replies:** 1\
**Last updated:** [March 19, 2019, 3:40pm UTC](https://community.auth0.com/t/php-back-end-and-jquery-front-end/22801 "2019-03-19T15:40:04Z")

</div>

Hi all, We have a software written in PHP as backend. And Jquery on the front end. We used to use our own authentication but I would like to switch to Auth0. I followed the php backend tutorial and I can verify tokens…

---

## [Add roles and permissions to user](https://community.auth0.com/t/add-roles-and-permissions-to-user/21007)

<div class="topic-metadata">

**Author:** [@didi](https://community.auth0.com/u/didi)\
**Replies:** 1\
**Last updated:** [February 18, 2019, 9:07pm UTC](https://community.auth0.com/t/add-roles-and-permissions-to-user/21007 "2019-02-18T21:07:24Z")

</div>

I am using Laravel with the Auth0 PHP SDK and the Laravel plugin. With below rule to attach roles, permissions and groups to users: function (user, context, callback) { context.idToken\['https://NAME.auth0.com/claims/a…

---

## [Missing "InResponseTo" with SP initiated SSO to Auth0 IdP SAML](https://community.auth0.com/t/missing-inresponseto-with-sp-initiated-sso-to-auth0-idp-saml/20902)

<div class="topic-metadata">

**Author:** [@neerolyte](https://community.auth0.com/u/neerolyte)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 10:44pm UTC](https://community.auth0.com/t/missing-inresponseto-with-sp-initiated-sso-to-auth0-idp-saml/20902 "2019-02-04T22:44:32Z")

</div>

I’m trying to integrate a PHP based app that already uses SimpleSAMLphp with other SAML2 IdPs. When authenticating with our app as the SP and Auth0 as the IdP and roughly the following procedure for configuration: Sig…

---

## [Pass contacts.readonly scope to google IDP](https://community.auth0.com/t/pass-contacts-readonly-scope-to-google-idp/14570)

<div class="topic-metadata">

**Author:** [@Ben\_Smith](https://community.auth0.com/u/Ben_Smith)\
**Replies:** 6\
**Last updated:** [August 23, 2018, 9:39pm UTC](https://community.auth0.com/t/pass-contacts-readonly-scope-to-google-idp/14570 "2018-08-23T21:39:21Z")

</div>

Hello, trying to pass the https://www.googleapis.com/auth/contacts.readonly scope to google when a user logs in using their gmail account. This scope isn’t listed on the google social connection auth0 page. I’m trying …

---

## [Get id\_token in php app](https://community.auth0.com/t/get-id-token-in-php-app/14016)

<div class="topic-metadata">

**Author:** [@Ben\_Smith](https://community.auth0.com/u/Ben_Smith)\
**Replies:** 2\
**Last updated:** [August 7, 2018, 3:29am UTC](https://community.auth0.com/t/get-id-token-in-php-app/14016 "2018-08-07T03:29:32Z")

</div>

Trying to get and decode the user’s id\_token so I can get access to some data passed by a Rule: context.idToken\[namespace + 'access\_token'\]. I’m using the PHP SDK: $auth0 = new Auth0(\[ 'domain' =\> getenv('AUT…

---

## [Timeout using PHP Library and Lock](https://community.auth0.com/t/timeout-using-php-library-and-lock/7309)

<div class="topic-metadata">

**Author:** [@yannick](https://community.auth0.com/u/yannick)\
**Replies:** 2\
**Last updated:** [February 14, 2018, 5:29pm UTC](https://community.auth0.com/t/timeout-using-php-library-and-lock/7309 "2018-02-14T17:29:33Z")

</div>

I’ve been using Lock for quite some time now, along with the PHP SDK and it has been reported that there is an issue with users being logged out after less than 30 minutes regardless of the session timeout being set to 3…

---

## [Method to get new access\_token based on refresh\_token in PHP SDK](https://community.auth0.com/t/method-to-get-new-access-token-based-on-refresh-token-in-php-sdk/7721)

<div class="topic-metadata">

**Author:** [@patrick.brunmayr](https://community.auth0.com/u/patrick.brunmayr)\
**Replies:** 2\
**Last updated:** [February 9, 2018, 12:50pm UTC](https://community.auth0.com/t/method-to-get-new-access-token-based-on-refresh-token-in-php-sdk/7721 "2018-02-09T12:50:04Z")

</div>

Could not find any method in the PHP SDK that would generate a new access\_token based on the refresh\_token. Is there something missing ? How can i do that without doing manual CURL calls?

[Next page](https://community.auth0.com/tag/php/330.md?match_all_tags=true&page=1&tags%5B%5D=php)
