Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://0.0.0.0:48452/connect/google/callback

STRAPI VERSION v3.5.3
NODE VERSION v14.16.0

trying to auth with google - in localhost its working in local host but fails in production.

fallowing documentation on
Roles & Permissions (strapi.io)

Authorisation Error
Error 400: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://0.0.0.0:48452/connect/google/callback

i have seeing the same error in
Error 400: invalid_request Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://0.0.0.0:31822/connect/google/callback - Questions and Answers - Strapi Community Forum

but could not find the answer,
regards.

You need to set the url key in the server.js file (not the admin.url)

See: Configurations - Strapi Developer Documentation

thank you for replying.

this is my server.js

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
 // url: 'events-pr-back.herokuapp.com',
  admin: {
    auth: {
      secret: env('ADMIN_JWT_SECRET'),
    },
  },
});

the ADMIN_JWT_SECRET is existed in my .env file.
this alone wouldn’t fix the issue as the same error pressiste.

if i change the host from
host: env(‘HOST’, ‘0.0.0.0’),
to
host: ‘events-pr-back.herokuapp.com’),
results in: address not available error

if i add
url: ‘events-pr-back.herokuapp.com’,
results in no error… the server is on but navigation to /admin end with ‘not found’
and at google error showing the server address as 0.0.0.0/events-pr-back.herokuapp.com

so: i guess the host value should point to the cdn but end with loop error instead.

i have found 1 post with the same issue as this at
Strapi fails to start on using HOST env variable - Questions and Answers - Strapi Community Forum
but the answer like is not working.

so: Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://0.0.0.0:48452/connect/google/callback still remain

Not sure for google auth.
Im using Facebook auth and my config/server.js

url: env(“SERVER_URL”, “http://localhost:1337”)

Set your env variables “SERVER_URL” with yours.

thanks hungtk…

in my case adding the above will make domain/admin – not found
(but domain is ok)
still google came with the same error massage… but working on local host.

It needs to be https://events-pr-back.herokuapp.com or http://events-pr-back.herokuapp.com you are missing the scheme in the URL