Hi, It's Me! Irina Lu

wenjia lu

Wenjia's Tech Blog

GET IN TOUCH

Contact Info description

集成 Auzure ad 的 msal 库

之前我写了一个简单的 web app:文章链接🔗。

但是登录注册功能比较简单,而且要自己建数据库存储用户的信息。

正好最近有接触到微软的azure ad,它是企业级的授权验证方案,。。

可以方便app开发者和用户。。

所以我决定在我的应用中集成这个功能, 来管理&便利我的用户登录 ~

Azure portal –> app registration —> register–> 填写我的应用名称 + 重定向 URI https://wenjia-smart-brain.herokuapp.com/ –> 在 Quickstart 中按照说明下载对应app的文件并修改配置【比如我的应用是 node.js 写的, 我就参考的是 node.js 应用的授权教程】(鹿鹿贴心提醒,除了官方提醒,还别忘了修改redirect uri。)

  1. Go to the Azure portal - App registrations quickstart experience.
  2. Enter a name for your application and select Register.
  3. Follow the instructions to download and automatically configure your new application.

成功后就可以访问 127.0.0.1:3000, 可以看到:

报错:(鹿鹿贴心提醒,除了官方提醒,还别忘了修改redirect uri。不然会有以下报错。)

如果遇到问题,可以通过 https://github.com/wenjialu 给我留言~