Http://localhost:3000/ is not in the list of allowed callback URLs

Hi All,

I’m trying to get the auth0 working with my rails5 (5.2.2) app, and I’m getting this error when I click login with google

#error I'm getting

I’ve checked my application callback URLs and that seems to be having the correct callback with localhost:3000

Can someone help me out to find what I’m doing wrong here, It seems like all the values are correct for me.

#callback url in my application

Please note I’ve read the similar issues and they all seems to be around having the wrong client id etc…, but I’ve double checked the client ID and they are matching, in-fact, this is the only application I have under my account

Thanks in advance,

Cheers,

Sam

Hello @sameera207,

The callback url must match exactly. Remove everything after http://localhost:3000/ from your Allowed Callback URLs and you should be all set.

1 Like

thanks @markd for the quick reply, I did try that, then the login process works, however then, instead of redirecting to the callback url for omniauth it redirect back to the home/login page.

BTW, I’m following Building Secure APIs with Rails 6 and Auth0 tutorial with new changes to rails secrets etc…

@sameera207 - As you can see on that post, it’s a couple of years old. I’d suggest our RoR quickstart here:

Your callback URL should not be your homepage if you’re using OmniAuth. You probably need to change that in your initializer (“Initialize Omniauth Auth0” section in that link above). There are a few different ones you can use but that quickstart should cover what you need.

Let us know if you get stuck again!

1 Like

thanks @josh.cunningham, it worked perfectly :+1:

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.