二进制运行ory

1.start the server

OAUTH2_CONSENT_URL=http://localhost:3000/consent \
OAUTH2_LOGIN_URL=http://localhost:3000/login \
OAUTH2_ISSUER_URL=http://localhost:4444 \
OAUTH2_SHARE_ERROR_DEBUG=1 \
LOG_LEVEL=debug \
DATABASE_URL=memory \
hydra serve all --dangerous-force-http

OAUTH2_CONSENT_URL = http://localhost:3000/同意这将设置同意提供者的URL(必需)。
OAUTH2_LOGIN_URL = http://localhost:3000/login这将设置登录提供程序的URL(必需)。
OAUTH2_ISSUER_URL = https:// localhost:4444/此值必须设置为ORY Hydra的公共URL(必需)。


2.create a new client that we can use to perform the OAuth 2.0 Authorization Code Flow

hydra clients create \
--endpoint http://localhost:4445 \
--id test-client \
--secret test-secret \
--response-types code,id_token \
--grant-types refresh_token,authorization_code \
--scope openid,offline \
--callbacks http://127.0.0.1:4446/callback

 


3.download and cd "hydra-login-consent-node-master"
npm i
HYDRA_ADMIN_URL=http://localhost:4445 npm start

4.
hydra token user     
--endpoint http://localhost:4444/     
--scope openid,offline     
--client-id test-client     
--client-secret test-secret

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值