# Login and signup on my own page using PHP

**URL:** <https://community.auth0.com/t/login-and-signup-on-my-own-page-using-php/8884>\
**Category:** Get Help\
**Tags:** login-auth0\
**Created:** [December 5, 2017, 3:11pm UTC](https://community.auth0.com/t/login-and-signup-on-my-own-page-using-php/8884 "2017-12-05T15:11:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.dilger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/c.dilger/32/7485_2.png) [@c.dilger](https://community.auth0.com/u/c.dilger)\
**Post date:** [December 5, 2017, 3:11pm UTC](https://community.auth0.com/t/login-and-signup-on-my-own-page-using-php/8884/1 "2017-12-05T15:11:13Z")

</div>

I’m figuring out how to do login and signup without the user leaving my PHP-site. Is there any chance to simply talk to the API and do it without Lock widget or a hosted page?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [December 5, 2017, 5:17pm UTC](https://community.auth0.com/t/login-and-signup-on-my-own-page-using-php/8884/2 "2017-12-05T17:17:22Z")

</div>

It should be possible by leveraging Auth0.js v8 `login`method and [cross-origin authentication](https://auth0.com/docs/cross-origin-authentication). You should review the cross-origin documentation to see if the characteristics of this type of authentication would be suitable for your scenario. I could not find any sample with cross-origin and Auth0.js as the ones I know about use Lock; in addition, the reference documentation for Auth0.js does not seem very complete with regards to this so I asked the documentation team to review this situation.

Another alternative would be to just submit the end-user credentials to the back-end and then from the back-end perform a resource owner password credentials grant in order to obtain the tokens and validate the credentials. You could then maintain a PHP session after having validated the credentials.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/login-and-signup-on-my-own-page-using-php/8884/3 "2018-03-02T05:57:38Z")

</div>


