anerg2046 / sns_auth

通用第三方登录SDK,支持微信,微信扫码,QQ,微博登录,支付宝登录,Facebook,Line,Twitter,Google

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

callback中的$name怎么来的?

icaohongyuan opened this issue · comments

比如Google,回调地址怎么填写?

你自己传递啊,可以是url传参或者任何其他你喜欢的方式

首先感谢回复! 我理解是的:比如Google登录,首先三个参数是必须的:client_id, client_secret, redirect_uri 1. 我发起登录认证,页面跳转至Google登录页面; 2. 登录完成后,回调到redirect_uri填写的地址,并传参code; 3. 获取code后方可获取access_token和userinfo。 那么问题是,假如回调地址你写的callback($name), 那么redirect_uri是不是应该写成:https//example.com/sns/callback?name=google 是我理解有错误么,请大神指点! 请大神指点。

------------------ 原始邮件 ------------------ 发件人: "Coeus Rowe"notifications@github.com; 发送时间: 2019年9月25日(星期三) 晚上11:19 收件人: "anerg2046/sns_auth"sns_auth@noreply.github.com; 抄送: "曹鸿源"895467839@qq.com;"Author"author@noreply.github.com; 主题: Re: [anerg2046/sns_auth] callback中的$name怎么来的? (#31) 你自己传递啊,可以是url传参或者任何其他你喜欢的方式 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

是的,没错,这个callback差不多就应该是这个样子,当然,用路由的话,你可以弄成各种各样你喜欢的形式 比如 https://a.com/sns/callback/google