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

documentation or setup not working for angular spa vs .net core api

未关闭
#70 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
- [X] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>
I followed tutorial at https://github.com/azure-samples/ms-identity-ciam-javascript-tutorial/tree/main/2-Authorization/2-call-api-angular, I am able to run the solution and launch the angular, when I click login I am forwarded to microsoft login prompt.

This is the url at this time which shows a correct redirect uri (in my opinion localhost/auth)

**REDACTED**

But after logging in I get a screen saying
We're unable to complete your request
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.

![image](https://github.com/Azure-Samples/ms-identity-ciam-javascript-tutorial/assets/13153164/9468c77b-8bd0-49a9-a64a-6f8ad89e432c)

In the configuration of the spa we can see the redirect urls configured correctly :
![image](https://github.com/Azure-Samples/ms-identity-ciam-javascript-tutorial/assets/13153164/1294735b-4800-4f24-a701-eeb391d97616)

### Any log messages given by the failure
>
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
> redirect to spa /auth path.

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 11

### Versions
>

### Mention any other details that might be useful

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

贡献指南

打开贡献指南

调研方向

从链接的 Angular 授权教程开始,在 Windows 11 上复现登录流程。将登录后发送的重定向 URI 与 issue 中显示的 SPA 重定向 URI 配置进行比较。当登录在没有 invalid_request 的情况下返回 SPA 的 /auth 路径,并且设置指南与所需配置一致时,即表示完成。

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

评估

技术栈
angular, javascript
领域
api, authentication, documentation, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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