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

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

问题描述

我必须在我的应用中集成登录Twitter,如下所示。
https://dev.twitter.com/docs/auth/sign-twitter
这是用JavaScript开发的基于浏览器的应用程序
我一直在引用谷歌代码java脚本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

不幸的是,目前无法在基于浏览器的JavaScr中使用oAuth ipt安全。

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

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

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