使用 Twitter 登录 JavaScript OAuth [英] JavaScript OAuth sign in with Twitter

查看:38
本文介绍了使用 Twitter 登录 JavaScript OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在我的应用程序中集成登录与 Twitter,如下所示.https://dev.twitter.com/docs/auth/sign-twitter它是用 JavaScript 开发的基于浏览器的应用程序我一直在参考 google code java script OAuth,但我很困惑如何使用 oauth/authenticate 以及如何获取 oauth_token

I have to integrate Sign-in-with Twitter in my app as below. https://dev.twitter.com/docs/auth/sign-twitter It is browser based app developed in JavaScript I have been refering google code java script OAuth, but im confused how to use oauth/authenticate and how to get the oauth_token

有人可以帮我拿一些样品吗?

Can any one please help me out with some samples ?

推荐答案

问题在于,任何查看您页面的人现在也可以查看您必须保密的消费者密钥和机密.

Problem with this is that anyone who views your page can also now view your consumer key and secret which must be kept private.

现在,有人可以编写一个应用程序,使用您的应用程序凭据并做出顽皮和坏事,以至于 Twitter 和用户禁止您,而您无能为力.

Now, someone could write an app that uses your app credentials and do naughty and bad things to the point that twitter and users ban you, and there isnt anything you can do.

Twitter 确实声明,必须尽一切努力将这些值保密,以避免发生这种情况

Twitter do state that every possible effort must be made to keep these values private to avoid this happening

遗憾的是,目前无法在基于浏览器的 JavaScript 中安全地使用 oAuth.

Unfortunately, there is currently no way to use oAuth in Browser based JavaScript securely.

这篇关于使用 Twitter 登录 JavaScript OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆