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

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

オープン
#70 コメント 2 件 リアクション 0 件 担当者 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the linked Angular authorization tutorial and reproduce the login flow on Windows 11. Compare the redirect URI sent after sign-in with the SPA redirect URI configuration shown in the issue. Done means sign-in returns to the SPA's /auth path without invalid_request and the setup guidance matches the required configuration.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, javascript
領域
api, authentication, documentation, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。