Make redirect url to satisfy multiple instances

Created on 30 October 2023, 11 months ago
Updated 1 November 2023, 11 months ago

Problem/Motivation

If the website has multiple instances(prod and non-prod ones) and each instance has different url. None-prod instance get the database from prod. Then the redirect uri does not work for all non-prod instances.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

5.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States xdong

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @xdong
  • πŸ‡ΊπŸ‡ΈUnited States xdong
  • πŸ‡ΊπŸ‡ΈUnited States xdong
  • Status changed to Needs work 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

    That is an interesting challenge. Automating this might be hard to do within Simple OAuth. This patch appears to change the redirect_uri for all consumers, but I don't think that is a solution. In my experience the redirect URI is often a URL external to the Drupal host (for integrations with other services) so you would never want to change this value even in non-prod environments. Maybe you are using this for a headless app on the same domain?

    Maybe there could be a boolean on the consumer to indicate that the redirect URI is the Drupal host, in which case you could conditionally use the logic in this patch.

Production build 0.71.5 2024