Skip to content

Cannot get any authentication provider to work: redirect_uri_mismatch #6570

@alexdevmotion

Description

@alexdevmotion

Describe the bug
I followed the documentation, I tried using the react-login-front-end-app, no matter how hard I try, I always run into the same redirect_uri_mismatch error.

Steps to reproduce the behavior

  1. Select any provider in your strapi admin panel, let's go with GitHub, since it seems to be the simplest and also has a video tutorial from Strapi (tried following it step by step).
  2. Fill in the required fields as described in the docs; also follow the other steps described in the docs
  3. Go to http://localhost:1337/connect/github or click on the Github button inside the React login frontend boilerplate app

Expected behavior
Successful authentication

Screenshots
See in Additional context

System

  • Node.js version: 12.16.1
  • NPM version: 6.14.5
  • Strapi version: 3.0.1
  • Database: Postgres 12.3
  • Operating system: Windows 10 Pro x64

Additional context
Seems to be a problem with how strapi is sending the redirect_uri to the Oauth providers. Shouldn't it be something like https://760bbe10e952.ngrok.io/connect/github/callback ?
image
image

I also noticed that, as opposed to the tutorial video, redirect URL field in the provider config doesn't get automatically populated, could it be a frontend issue?
image

If I try any other provider (tried facebook & google as well), I also get an URL related error.

Metadata

Metadata

Assignees

Labels

severity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: docsDocumentation changessource: plugin:users-permissionsSource is plugin/users-permissions packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions