Azure-Samples / Azure-Samples/ms-identity-ciam-javascript-tutorial

Redirect URI Issue: input parameter redirect URI is invalid (despite verification of exact match and correct configuration)

未关闭
#77 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PowerShell
星标
75
派生
65
PR 合并指标
30 天内没有已合并 PR

描述

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
I followed along with the tutorial provided at this website: https://learn.microsoft.com/en-us/entra/external-id/customers/sample-web-app-node-sign-in

I have confirmed several times that the redirect URI - http://localhost:3000/auth/redirect - which is identical to the tutorial, is exactly correct in my configuration of the Web Redirect URI on Azure, and present in the body of the URL request (redacted / shortened version below).

https://##########.ciamlogin.com/#############/oauth2/v2.0/authorize?client_id=#######&scope=openid%20profile%20offline_access&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fredirect&client-request-id=etc., etc.

I have found several StackOverflows, Microsoft Community Submissions, etc. dating the last 4 years with similar issues. Each solution appears to be unique and not a global resolution to the problem.

### Any log messages given by the failure
The error message provided is:
invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.

### Expected/desired behavior
That the error message contain the actual values of the URIs (so that the developer can more easily identify where there is an inconsistency), or for this issue to be investigated in case there is a bigger issue at hand here.

I can see throughout logging during the application that the redirect URI is always the same value, all the way through it landing in the parameters of the URL, and I have confirmed that it is exactly correct in the Azure configuration. I've poked this every which way the last few hours and am stumped.

### OS and Version?
macOS Sonoma

### Versions
Microsoft Edge, v 120
Azure msal-node v. 2.6.4 (tested on version 1.17.2 and had the same response)

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

贡献指南

打开贡献指南

调研方向

从 Microsoft Entra customer sign-in tutorial 和示例的重定向 URI 配置开始,然后将已注册的 Azure URI 与 msal-node 2.6.4 和 1.17.2 发送的 URI 进行比较。完成的标准是找出可复现的不匹配,或确认服务问题,并记录具体的修复方案或更清晰的诊断结果。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, javascript, node.js
领域
authentication
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。