Locally Testing Azure Mobile Auth - invalid jwt signature

不羁的心 提交于 2019-12-07 07:36:25

To validate JWT tokens locally that were created by a hosted service, you need to obtain the signing key that is used. You can obtain this by opening a browser to https://mobile-service-name.scm.azurewebsites.net/Env.cshtml and finding the value for WEBSITE_AUTH_SIGNING_KEY. Take this value and configure your local server by creating (or updating) a file called azureMobile.js in the root of your project with the following content:

module.exports = {
    auth: { secret: 'value from WEBSITE_AUTH_SIGNING_KEY' }
};

It's recommended to exclude this file from deployment by adding azureMobile.js to your .gitignore file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!