Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setup callback URL in Baidu #1

Open
eugeniop opened this issue Aug 24, 2013 · 7 comments
Open

How to setup callback URL in Baidu #1

eugeniop opened this issue Aug 24, 2013 · 7 comments

Comments

@eugeniop
Copy link

Hi there,

I realize this is not really an issue with your library, but thought you might be able to help me.

I'm doing some tests with your library. I think I got everything right but I can't find where to enter the redirect_uri in Baidu. I don't know chinese so I'm rather challenged in navigating the site. I'm looking at this page:http://developer.baidu.com/wiki/index.php?title=docs/oauth (translated by Chrome). But can't find where to add the list of valid callback URLs.

Can you help me?

Thanks!
Eugenio

@woloski
Copy link

woloski commented Aug 27, 2013

👍

@xiaoao
Copy link
Owner

xiaoao commented Sep 2, 2013

app.get('/auth/baidu/callback',
passport.authenticate('baidu', { failureRedirect: '/login' }),
function(req, res) {
// Successful authentication, redirect home.
res.redirect('/'); // Your redirect url here
});

@woloski
Copy link

woloski commented Sep 2, 2013

we know how to use passport, the instructions we wanted were how to register the callback in Baidu portal. We dont know chinese and google translate is not helping :)

On Monday, 2 de September de 2013 at 05:02, xiaoao wrote:

app.get('/auth/baidu',
passport.authenticate('baidu'),
function(req, res){
// The request will be redirected to baidu for authentication, so this
// function will not be called.
});
app.get('/auth/baidu/callback',
passport.authenticate('baidu', { failureRedirect: '/login' }),
function(req, res) {
// Successful authentication, redirect home.
res.redirect('/'); // Your redirect url here
});


Reply to this email directly or view it on GitHub (#1 (comment)).

@eugeniop
Copy link
Author

eugeniop commented Sep 2, 2013

I'm looking here: http://developer.baidu.com/console but can't find where to setup de redirect_uri.

@xiaoao
Copy link
Owner

xiaoao commented Sep 13, 2013

you can setup the redirect_uri by following these steps:

  1. open http://developer.baidu.com/dev;
  2. in the "Web应用/移动客户端/合作网站" list click the name of your app, it wil bring you to a new page ;
  3. in the new page ,clik "API 管理" --> "安全设置";
  4. then unput your redirect_uri in "授权回调页”

ps. if you want input several uris , not beyond 10 items, and set off them by a comma.

btw. http://developer.baidu.com/console now is in development

@eugeniop
Copy link
Author

Awesome. Works great. Thanks very much for helping us navigate.

@jijo009
Copy link

jijo009 commented Sep 16, 2015

Does anyone know how its possible to update callback url with 'https' when using baidu open API . Please reffer attached screenshot

screenshot from 2015-09-16 16 18 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants