Passport-mastodon:Passport和Node.js的Mastodon身份验证策略

时间:2021-02-03 03:47:50
【文件属性】:
文件名称:Passport-mastodon:Passport和Node.js的Mastodon身份验证策略
文件大小:5KB
文件格式:ZIP
更新时间:2021-02-03 03:47:50
passport mastodon MastodonJavaScript 护照-假牙 使用OAuth 2.0 API与Mastodon进行身份验证的护照策略。 该模块使您可以在Node.js应用程序中使用Mastodon进行身份验证。 通过插入Passport,Mastodon身份验证可以轻松,毫不费力地集成到任何支持Connect风格中间件(包括Express)的应用程序或框架中。 安装 $ npm install passport-mastodon 用法 创建一个应用程序 在使用Mastodon护照之前,您必须在Mastodon注册一个应用程序。 如果您尚未这样做,则可以通过Mastodon REST API创建一个新的应用程序。 您的应用程序将获得一个应用程序ID和应用程序密钥,需要将其提供给该策略。 您还需要配置与您的应用程序中的路由匹配的重定向URI。 样品 $ curl -X POST -sS https://${MASTODON_HOST}/api/v1/apps \ -F "client_name=${CLIENT_NAME}" \ -F "redirect_uris=${CALLBACK_URL}" \ -F "scopes
【文件预览】:
passport-mastodon-master
----package.json(729B)
----test()
--------mocha.opts(83B)
--------stategy-test.js(2KB)
----lib()
--------index.js(172B)
--------strategy.js(2KB)
----README.md(2KB)

网友评论