Cache issue prevents users from being able to authorize

Created on 13 September 2023, about 1 year ago

Problem/Motivation

This problem occurs with the module dynamic_page_cache module enabled. Which I would say is pretty common to have enabled.

When a user visits the authorization URL (/media-fotoweb/oauth2/selection/callback) they are redirected to the fotoweb server and all is well.

The fotoweb server is instructed to send the user back to /media-fotoweb/oauth2/selection/callback with some parameters set.

When the user returns to that URL, the controller logic is to check if the request query contains a code, and do some logic based on that. However, this logic is never executed, as the response is cached (it's cached as a 302 to the fotoweb server). So the user ends up going back and forth and not understanding what is happening.

Steps to reproduce

Try to authorize fotoweb with the dynamic_page_cache module enabled.

Proposed resolution

Avoid caching the response like that. In fact, let's avoid caching these responses at all, as it's theoretically possible to resolve even the fotoweb redirect dynamically.

Remaining tasks

- Upload the patch I have here with a test-only patch
- Create a MR containing the test and the fix
- Commit

User interface changes

Yes, but only in terms of fixing the bugs ;)

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡΄Norway eiriksm Norway

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

Comments & Activities

Production build 0.71.5 2024