DEV Community

Cover image for UnderStanding OAUTH 2.0 in Simple Way!!
Prasanth K
Prasanth K

Posted on

UnderStanding OAUTH 2.0 in Simple Way!!

OAuth 2.0 is a way for websites and apps to let you sign in using your existing accounts from other websites, like Google, Facebook, or Twitter. It's like using a key to unlock different doors. Instead of creating a new account for each website you want to use, you can use your existing account and give that website permission to access certain information from your account.

Here's how it works:

  1. You go to a website that uses OAuth 2.0 and click the "Sign in with Google" (or Facebook, Twitter, etc.) button.
  2. The website will redirect you to the Google (or Facebook, Twitter, etc.) sign-in page.
  3. You sign in to your Google (or Facebook, Twitter, etc.) account.
  4. Google (or Facebook, Twitter, etc.) will ask you if you want to allow the website to access certain information from your account, like your name, email address, and profile picture.
  5. If you click "Allow," Google (or Facebook, Twitter, etc.) will give the website a special code called an access token.
  6. The website uses the access token to access the information from your Google (or Facebook, Twitter, etc.) account that you allowed it to access.

This process is much simpler than creating a new account for each website you want to use, and it also helps to keep your personal information safe.

Here are some of the benefits of using OAuth 2.0:

** It's easier to sign in to websites.
It helps to keep your personal information **safe.
It allows websites to access information from your account without storing your password.

OAuth 2.0 is a secure and convenient way to sign in to websites and apps. If you're not sure how to use OAuth 2.0, you can usually find instructions on the website you're trying to sign in to.

Top comments (0)