{"id":14189,"date":"2012-07-03T21:01:17","date_gmt":"2012-07-03T13:01:17","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=14189"},"modified":"2025-04-04T01:10:29","modified_gmt":"2025-04-03T17:10:29","slug":"oauth-connect","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/","title":{"rendered":"What is OAuth Connect and How To Use It"},"content":{"rendered":"<p>Many of us come into contact with OAuth when browsing around the Web, and most of us aren\u2019t even aware of its existence. OAuth(Open Authentication) is a system which grants third-party websites limited access into user accounts, for example, your Twitter or Facebook accounts.<\/p>\n<p>It lets visitors interact within the site without requiring new account registration or releasing your username and password to third parties.<\/p>\n<p>In this guide I\u2019d like to introduce the concept of OAuth and how it can apply to developers. There are a lot of technical details involved in the implementation of your own OAuth application. My example will be written in PHP using a Twitter library wrapper, but you could use nearly any popular programming API from Python to Ruby or Objective-C.<\/p>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/mobile-frameworks\/\">10 HTML\/CSS & JavaScript Frameworks to Build Mobile Apps<\/a>\n\t\t\t\t<\/p>\n<p>Even if the concept feels cryptic, attempt to digest as much as you can. It\u2019s still a very mysterious technology, having just been drafted <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/oauth.net\/about\/\">back in 2007<\/a>. I certainly didn\u2019t understand how to develop full OAuth Connections even after my first few tutorials but if you stick with it, you\u2019ll catch on fast. Now first to kick things off, a small introduction!<\/p>\n<h2>What Problems Can We Solve?<\/h2>\n<p>If you consider how much more connected the Internet has become, it only makes sense that users will want to share information between multiple accounts from Facebook into Twitter, Tumblr, Foursquare, and now even into mobile apps such as <em>Path<\/em> or <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/instagr.am\/\">Instagram<\/a>.<\/p>\n<p>The problem we face now is how to accomplish this in the most secure and simplest way possible. OAuth 1.0 is an attempt to solve this and numerous other problems, compared with older OpenID standards. Users are still entering their username\/password into other third party websites just to connect into OpenID.<\/p>\n<p>This doesn\u2019t make it any safer for the user. Under OAuth specs, the user never needs to store any personal account data into a third party database.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg\" alt=\"\" height=\"318\" width=\"500\"><\/figure>\n<p>With OAuth, the main account provider (e.g. Twitter, Facebook) will first redirect you (the user) to an authorization page. The user then logs into the main network, and then either accepts or denies a new connection into the third party website.<\/p>\n<p>The technology is painlessly easy and you can always unauthorize the connections from your account settings at any point. Notice that your password is never given to the 3rd party which makes this protocol a lot more safer than its counterpart.<\/p>\n<h2>How the Process Works<\/h2>\n<p>There are 3 parties to consider in a standard OAuth call:<\/p>\n<ul>\n<li><strong>Service Provider<\/strong> \u2013 The main network you are trying to pull data from. They provide the API response such as your username, profile picture, website URL, and other stuff.<\/li>\n<li><strong>Consumer<\/strong> \u2013 The 3rd party app looking to receive data. This would be the website or mobile app which makes the initial connection request, then also handles the return data after authorization.<\/li>\n<li><strong>User<\/strong> \u2013 The person sitting behind the computer interacting with the websites which would be you!<\/li>\n<\/ul>\n<p>The purpose of OAuth isn\u2019t to provide a specific library for websites to use. It actually sets up the \u201crules\u201d for building an open protocol API. So while we can all benefit from this technology it\u2019s actually developers who will really find interest in this area. If you need more info check out the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc5849\">revised v1.0 edition<\/a> released n April 2010.<\/p>\n<h2>Facing Security<\/h2>\n<p>The entire process ultimately requires 2 different keys along with an access token. The keys are provided by the root service after you register an application \u2013 these are known as your <strong>client<\/strong> and <strong>secret ID<\/strong>. The client ID is generally passed into the Authentication URL so the server can recognize your app.<\/p>\n<p>The secret ID is held in your code so the server can verify your app\u2019s identity. Similarly the remote server will match up your secret ID with their own so you don\u2019t mistakenly send a twitter request to Facebook\u2019s API, or vice versa.<\/p>\n<p>If the user authorizes the connection and all keys match up, then they are returned to your website with a long code of random numbers and letters.<\/p>\n<p>This code is used to generate a new <strong>access token<\/strong>. These behave similar to a session variable which you can store in a cookie to keep the user logged into your website. The only difference is that many services will send back an Access Token and Secret Access Token.<\/p>\n<p>You likely need both of these to pull any data from the server. An example could be requesting the user\u2019s profile photo to save a copy on your own website.<\/p>\n<h2>Example Library for Twitter OAuth<\/h2>\n<p>Developers aren\u2019t often likely to start from scratch so why not look into a previously-built library? This will save us our time, and from headaches, when working with PHP. Let\u2019s look into building a really simple example on top of the Twitter API.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-applications-auth-list.jpg\" alt=\"Twitter Account Settings - Authorized Applications\" width=\"500\" height=\"335\"><\/figure>\n<p>I highly recommend <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/jmathai\/twitter-async\">Twitter Async<\/a> by Jaisen Mathai on GitHub. It works perfectly and even provides some really straightforward example codes that we can look at. You can download the .zip for now, but before we look into the code we need to register and get our app IDs from Twitter.<\/p>\n<h2>Registering a New Application<\/h2>\n<p>The <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/dev.twitter.com\/\">Twitter Dev Center<\/a> is a great resource for those just getting started on the API. It has been written and rewritten many times over the course of a few years. The page we want is <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.google.com.sg\/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwj3r9XRrfnUAhXEQpQKHT_BATEQFggnMAA&url=https%3A%2F%2Fdev.twitter.com%2F&usg=AFQjCNFAYUrXMeX1dc9ecgjwY36zQ0bD1g\">https:\/\/dev.twitter.com\/apps\/new<\/a>. It will ask you to log in at first, then you need to enter some credentials for a new application.<\/p>\n<figure><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/dev.twitter.com\/\"><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-developers-center-2.jpg\" alt=\"Twitter dev center - register a new app\"><\/a><\/figure>\n<p>The App name and description are displayed when the user goes to authorize with Twitter. Your Web URL is also important to distinguish the third party address. It would be easier to work with a live domain although you can use localhost for testing, but I do not enourage this method. It\u2019s just as easy to sign up for a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.000webhost.com\/\">free web host<\/a> and run your scripts from there.<\/p>\n<p>The Callback URL is stated as the final destination after your visitors either accept or deny the authorization. It\u2019s your job as the programmer to read the response from Twitter and output a message accordingly.<\/p>\n<p>In the Async library we\u2019ve already got some credentials in place, but they won\u2019t work since the callback URL is specified to an external blog. If you\u2019re interested in building a fully-connected OAuth web app I\u2019ve included some detailed tutorials below.<\/p>\n<h2>Check Out the Code<\/h2>\n<p>If you are using a remote web host you may want to unzip the Async libraries and upload them to a new directory. Otherwise you can just check out the source code. It\u2019s likely that we won\u2019t be able to pull a new connection anyways. But hands-on experience with uploading and editing source code is always a learning process.<\/p>\n<p>In the root directory you\u2019ll find a script named <strong>simpleTest.php<\/strong>. Inside is a whole lot of PHP codes related to the OAuth libraries included. I won\u2019t be able to put it all together for you, but we should look at an important code block to pinpoint notable details.<\/p>\n<pre>&lt;?php\r\ninclude 'EpiCurl.php';\r\ninclude 'EpiOAuth.php';\r\ninclude 'EpiTwitter.php';\r\n$consumer_key = 'jdv3dsDhsYuJRlZFSuI2fg';\r\n$consumer_secret = 'NNXamBsBFG8PnEmacYs0uCtbtsz346OJSod7Dl94';\r\n$token = '25451974-uakRmTZxrSFQbkDjZnTAsxDO5o9kacz2LT6kqEHA';\r\n$secret= 'CuQPQ1WqIdSJDTIkDUlXjHpbcRao9lcKhQHflqGE8';\r\n$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $token, $secret);\r\n$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret);\r\n?&gt;\r\n<\/pre>\n<p>There are 4 very important variables for the consumer key and secret ID, along with the token and secret token ID. Not all API services will require this set of 4, but it is proper OAuth protocol. The EpiTwitter class requires all 4 values as parameters and generates the connection URL into Twitter.<\/p>\n<pre>https:\/\/api.twitter.com\/oauth\/authorize?oauth_token=TOKEN_ID_HERE<\/pre>\n<p>With this new dynamic URL you can create a login button for your users. This would direct them first to a secure Twitter API page where the user either accepts or denies your connection. Regardless of their choice the user then gets re-directed to your app callback URL.<\/p>\n<p>The entire open protocol has a very clean perspective which allows for rapid development, especially with libraries available in practically every language.<\/p>\n<h2>Related Links<\/h2>\n<ul>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/maqentaer.com\/devopera-static-backup\/http\/dev.opera.com\/articles\/view\/gentle-introduction-to-oauth\/index.html\">Gentle Introduction to OAuth<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developer.twitter.com\/en\/docs\/basics\/authentication\/overview\/oauth\">OAuth FAQ<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developers.facebook.com\/docs\/authentication\/\">Facebook Authentication Dev Guide<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/dev.twitter.com\/oauth\/reference\/get\/oauth\/authenticate\">Simple Twitter OAuth Signin<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/rodrigo.sharpcube.com\/2010\/06\/29\/using-oauth-with-twitter-in-cocoa-objective-c\/\">Using OAuth with Twitter in Cocoa Objective-C<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/blog.stakeventures.com\/articles\/consuming-oauth-intelligently-in-rails\">Consuming OAuth Intelligently in Rails<\/a><\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Hopefully this introduction into OAuth has got you interested in building apps over the protocol. Many developers have been striving for just such a solution, and OAuth 2.0 may be the future of interconnected social networks. I already use over two dozen connections into my Twitter account and have been really impressed with the developer\u2019s documentation!<\/p>\n<p>Clearly there is a lot to say on this topic. It\u2019s not something you may be able to fully process in one sitting. Browse around the net for more OAuth solutions and let us know your thoughts in the discussion area below.<\/p>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/cordova-getting-started\/\">Creating Your Own Mobile App with Cordova<\/a>\n\t\t\t\t<\/p>","protected":false},"excerpt":{"rendered":"<p>Many of us come into contact with OAuth when browsing around the Web, and most of us aren\u2019t even aware of its existence. OAuth(Open Authentication) is a system which grants third-party websites limited access into user accounts, for example, your Twitter or Facebook accounts. It lets visitors interact within the site without requiring new account&hellip;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3398],"tags":[4601],"topic":[4521],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What is OAuth Connect and How To Use It - Hongkiat<\/title>\n<meta name=\"description\" content=\"Many of us come into contact with OAuth when browsing around the Web, and most of us aren&#039;t even aware of its existence. OAuth(Open Authentication) is a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is OAuth Connect and How To Use It\" \/>\n<meta property=\"og:description\" content=\"Many of us come into contact with OAuth when browsing around the Web, and most of us aren&#039;t even aware of its existence. OAuth(Open Authentication) is a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-03T13:01:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:10:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg\" \/>\n<meta name=\"author\" content=\"Jake Rocheleau\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Rocheleau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/\"},\"author\":{\"name\":\"Jake Rocheleau\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\"},\"headline\":\"What is OAuth Connect and How To Use It\",\"datePublished\":\"2012-07-03T13:01:17+00:00\",\"dateModified\":\"2025-04-03T17:10:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/\"},\"wordCount\":1433,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/oauth-connect\\\/twitter-oauth-connection.jpg\",\"keywords\":[\"Security and Privacy\"],\"articleSection\":[\"Internet\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/\",\"name\":\"What is OAuth Connect and How To Use It - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/oauth-connect\\\/twitter-oauth-connection.jpg\",\"datePublished\":\"2012-07-03T13:01:17+00:00\",\"dateModified\":\"2025-04-03T17:10:29+00:00\",\"description\":\"Many of us come into contact with OAuth when browsing around the Web, and most of us aren't even aware of its existence. OAuth(Open Authentication) is a\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/oauth-connect\\\/twitter-oauth-connection.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/oauth-connect\\\/twitter-oauth-connection.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/oauth-connect\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is OAuth Connect and How To Use It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\",\"name\":\"Jake Rocheleau\",\"description\":\"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/jake\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What is OAuth Connect and How To Use It - Hongkiat","description":"Many of us come into contact with OAuth when browsing around the Web, and most of us aren't even aware of its existence. OAuth(Open Authentication) is a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/","og_locale":"en_US","og_type":"article","og_title":"What is OAuth Connect and How To Use It","og_description":"Many of us come into contact with OAuth when browsing around the Web, and most of us aren't even aware of its existence. OAuth(Open Authentication) is a","og_url":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-07-03T13:01:17+00:00","article_modified_time":"2025-04-03T17:10:29+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg","type":"","width":"","height":""}],"author":"Jake Rocheleau","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Jake Rocheleau","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/"},"author":{"name":"Jake Rocheleau","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a"},"headline":"What is OAuth Connect and How To Use It","datePublished":"2012-07-03T13:01:17+00:00","dateModified":"2025-04-03T17:10:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/"},"wordCount":1433,"commentCount":10,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg","keywords":["Security and Privacy"],"articleSection":["Internet"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/","url":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/","name":"What is OAuth Connect and How To Use It - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg","datePublished":"2012-07-03T13:01:17+00:00","dateModified":"2025-04-03T17:10:29+00:00","description":"Many of us come into contact with OAuth when browsing around the Web, and most of us aren't even aware of its existence. OAuth(Open Authentication) is a","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/oauth-connect\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/oauth-connect\/twitter-oauth-connection.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/oauth-connect\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is OAuth Connect and How To Use It"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a","name":"Jake Rocheleau","description":"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/jake\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-3GR","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=14189"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14189\/revisions"}],"predecessor-version":[{"id":73531,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14189\/revisions\/73531"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=14189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=14189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=14189"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=14189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}