chatwoot/spec/controllers
Vinícius Fitzner b791d75b30
fix(microsoft): prevent OAuth admin consent loop (#13962)
Fixes #9775

## Description

This fixes a repeated admin consent loop in the Microsoft OAuth flow
when connecting a Microsoft email inbox.

Chatwoot was always sending `prompt=consent` in the Microsoft
authorization URL. In the current code path, this parameter is only used
when building the authorization URL and is not required by the callback,
token exchange, token persistence, or refresh flow.

By removing the forced consent prompt, the OAuth flow can proceed
normally without repeatedly sending users back through the admin consent
screen.

## What changed

- removed `prompt: 'consent'` from the Microsoft authorization URL
- added a regression assertion to ensure `prompt` is not included in the
generated URL

## Why this is safe

- `redirect_uri`, `scope`, and `state` remain unchanged
- callback and token exchange flow remain unchanged
- refresh token flow remains unchanged
- no other part of the current Microsoft inbox flow depends on forcing a
consent screen

## Testing

- updated controller spec to assert that the generated authorization URL
does not include `prompt`
2026-06-03 12:05:25 +05:30
..
api fix(microsoft): prevent OAuth admin consent loop (#13962) 2026-06-03 12:05:25 +05:30
auth feat: ensure signup verification [UPM-14] (#13858) 2026-04-07 13:45:17 +05:30
concerns feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
devise fix: Implement resend confirmation feature for login page (#11970) 2026-05-07 15:13:04 +05:30
devise_overrides fix: Session controller to not generate auth tokens before mfa verification (#12487) 2025-09-23 19:13:47 +05:30
google chore: update jwt and faraday (#14577) 2026-05-27 14:43:23 +05:30
instagram feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
installation chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
linear feat(linear): Support refresh tokens and migrate legacy OAuth tokens (#13721) 2026-03-17 13:09:03 +04:00
microsoft fix: use UPN for imap_login on Microsoft OAuth callback (#14522) 2026-06-02 13:26:30 +05:30
notion feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
platform/api/v1 fix(agent-bots): destroy permissibles on AgentBot deletion and skip orphans in index (#14273) 2026-04-27 19:17:32 +05:30
public/api/v1 feat: Add a documentation layout design for public help center portal (#14403) 2026-05-18 12:30:08 -07:00
service chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
shopify fix: shopify and leadsquared specs in ci (#12926) 2025-11-21 17:01:03 +05:30
super_admin feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369) 2026-05-20 17:36:09 +05:30
tiktok feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
twilio feat: Store WhatsApp BSUID identifiers from inbound webhooks (#14436) 2026-05-20 13:36:43 +04:00
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
webhooks fix: added HMAC validation for Whatsapp and Instagram webhooks (#14280) 2026-05-05 15:01:11 +05:30
.keep Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
android_assetlinks_spec.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller_spec.rb feat: add chatwoot instance status in superadmin (#6045) 2023-01-30 18:37:51 +05:30
apple_app_spec.rb chore: Configure iOS universal linking (#10651) 2025-01-08 21:25:11 +05:30
dashboard_controller_spec.rb fix: Avoid throwing 406 for non-json requests (#11701) 2025-06-10 15:12:32 -04:00
health_controller_spec.rb feat: add lightweight /health endpoint (#13386) 2026-01-29 00:24:01 +05:30
microsoft_controller_spec.rb fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
slack_uploads_controller_spec.rb fix: Set avatar for users(agent/contact) in slack channels (#7960) 2023-09-26 09:38:14 +05:30
swagger_controller_spec.rb fix(swagger): prevent path traversal in docs controller (#14458) 2026-05-14 18:52:14 +05:30
widget_tests_controller_spec.rb [Feature] Email collect message hooks (#331) 2020-01-09 13:06:40 +05:30
widgets_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30