Avoid redirect if _format=json is included in the query parameters

Created on 21 July 2022, over 2 years ago
Updated 11 December 2023, about 1 year ago

Problem/Motivation

When trying to authenticate a user using `/user/login?_format=json` the JSON response redirects to the user profile.

Steps to reproduce

Authenticate via POST request against `/user/login?_format=json` the response is going to redirect the user.

Need to have CORS enabled and try to access from a different domain.

Proposed resolution

Check if format json is passed as query parameter.

Remaining tasks

none

User interface changes

none

API changes

none

Data model changes

none

Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

🇲🇽Mexico isramv

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024