chriss39's avatar

Anyone have any feedback on Auth0

I am building an app where I plan to allow a user to authenticate with their social accounts. I was just getting ready to start coding that portion of my app when I came across http://auth0.com. This will not be a large volume app. Maybe 5k users in a year at most. Thinking it may be easier to use their api to tie into more ways to authenticate rather than building the wheel over again.

Just looking to see if anyone has used them and what the pros and cons are from your experience. Also maybe there are already some open source packages available that do what I am looking for to save me some coding time.

Thanks

0 likes
10 replies
glena's avatar

Hi,

Did you take a look at the auth0 package for laravel?

I am the guy working on it and it provides an easy way to do what you want. You can extend the user provider to easily fetch and store the user data in your database. Also, check the pricing, I think the free tier will be more than enough (you have up to 7k active users per month).

Check the doc for regular webapps https://auth0.com/docs/quickstart/webapp/laravel/ (and there is another one for authenticating requests with JWT).

Let me know if you need a hand and I can guide you and if you have feedback, it is always welcome :)

glena's avatar

Yes, it should work fine.

What kind of error are you having?

I assume you are trying to handle regular sessions (and not an API with JWT).

If you

  • add the provider
  • add the alias
  • bind the user repository
  • publish the config and complete with your own credentials
  • add the callback route

it should work just fine.

chriss39's avatar

I got stuck trying this before and just tried again. I get have gotten so I can add the login button and it goes to whichever service I try to use. When it sends me back I get this error.

CoreException in Auth0.php line 141: Invalid domain

I do have my info domain, client id, client secret, and domain set in /vendor/auth0/src/config/config.php and that seems to work fine doing the initial part to login but once it redirects back for some reason I have an invalid domain. I am doing this locally with a .dev domain but I don't think that would be the issue.

chriss39's avatar

Now I got past that error with running this again as I think I ran it before I have completed my vendor config file. php artisan vendor:publish

Now my I get a connection timeout. Maybe because I am on local environment trying to connect to ssl but I would not think so.

Exception in Client.php line 473: Failed to connect to [mydomain].auth0.com port 443: Connection timed out

glena's avatar

that is weird. Can you reach this from your command line.

try running

curl https://wptest.auth0.com/authorize

from your console. If your app is running from a virtual machine (vagrant or homestead for example), first run vagrant ssh and once you are in the VM run the curl.

You should be able to fetch an error page (since you are not sending the required parameters, but this is not important)

chriss39's avatar

That seems to be the problem. I can curl it from my terminal but when i ssh into my VM I can not curl it. Any ideas on a work around so I can continue to dev locally?

glena's avatar

so for some reason your VM does not have internet connection. maybe some issue with the network adapter...

you can run it locally using php artisan serve but you will need to have php installed and some database accessible (not sure if you have any other requirement like queues, elastic search or whatever other thing you have installed on your VM).

there are several answers on internet on how to make the vm to have internet connection (changing the virtualbox configuration or changing the vagrant file to set the correct ports forwarding or network adapter configuration)

chriss39's avatar

Yes I am looking into that now. Thanks for all of the help.

Please or to participate in this conversation.