Azure-Samples / Azure-Samples/ms-identity-ciam-javascript-tutorial
AuthProvider.js breaks on line 130 when Authentication provider is Google
- 主要语言
- 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
> Add Google as an external authentication provider, add it to the user flow and use it to authenticate
### Any log messages given by the failure
>
\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\auth\AuthProvider.js:130
codeVerifier: req.session.pkceCodes.verifier, // PKCE Code Verifier
^
TypeError: Cannot read properties of undefined (reading 'verifier')
at AuthProvider.handleRedirect (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\auth\AuthProvider.js:130:49)
at exports.handleRedirect (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\controller\authController.js:8:25)
at Layer.handle [as handle_request] (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\layer.js:95:5)
at next (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\route.js:144:13)
at Route.dispatch (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\route.js:114:3)
at Layer.handle [as handle_request] (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\layer.js:95:5)
at C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\index.js:284:15
at Function.process_params (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\index.js:346:12)
at next (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\index.js:280:10)
at Function.handle (C:\GitHub\ms-identity-ciam-javascript-tutorial\2-Authorization\4-call-api-express\App\node_modules\express\lib\router\index.js:175:3)
### Expected/desired behavior
> Not to crash
### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
### Versions
> Windows 11
### Mention any other details that might be useful
I changed the line to "codeVerifier: req.session.pkceCodes.verifier || 'Not verified', // PKCE Code Verifier" just to be able to continue with Entra External ID testing.
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
贡献指南
评估
这个 Issue 还没有评估数据。