The difference between OAuth and OpenID

Source: Internet
Author: User

Both OAuth and OpenID are open web third-party sign-in standards, both use HTTP redirection and can centrally manage login validity.

Unlike that, OpenID's goal is to allow you to log in to multiple websites with just one login action. When you want to sign in to a website that uses the OpenID service, it redirects you to the website that provides the OpenID service, and if you've already logged in, it's automatically redirected back, and you're signed in.

The goal of OAuth is to allow you to independently authorize "consumer" sites to read data on the "providers" site.

For example, you want a print site to help you print photos on Weibo. It redirects you to Weibo and asks you "allow it to read your photos?" "If you allow it, the print site will download all the photos you have on Weibo," he went on.

Using OAuth requires you to sign in to the "providers" site, as to how the "provider" site provides a way to sign in, completely unrelated to the OAuth mechanism. Can be a user name password, physical token, or OpenID.

OpenID doesn't care about the data. While its extended protocols will also support storing content like your name, avatar, phone number, and more, and provide it to websites that use the OpenID service. But essentially, it's just to get you to enter this generic information a few times. It does not store sensitive information related to the app.

The OAuth provider provides data about your app to others, and if you use a website to request your microblog OAuth authorization, you should be prepared to have all of your Weibo privileges.

You give someone oauth permission, that effect is like you give the user name password to others. The benefit of OAuth is that you don't have to really give him a username and password, and you can control the scope of the permission.

But OpenID doesn't have this effect, and even if you use two sites that use the same OpenID service, they can't read any information to each other and do nothing. OpenID is more "coarse-grained" than OAuth.

This article from "Technical Cock silk" blog, declined reprint!

The difference between OAuth and OpenID

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.