Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте OAuth 2.0 Basics | Authentication and Authorization Patterns
API Gateway Security Patterns

bookOAuth 2.0 Basics

How OAuth 2.0 Works

OAuth 2.0 is a protocol that lets you grant limited access to your resources without sharing your password. Instead of giving out your credentials, you use access tokens to allow applications to act on your behalf.

Access Tokens

An access token is a short-lived string that represents permission to access certain resources. Think of it as a temporary pass you give to an app so it can fetch your data safely.

  • Access tokens are generated by an authorization server;
  • They are sent to the client (the app that wants access);
  • The client uses the token to access protected resources on your behalf.

Basic OAuth 2.0 Flow Example

Imagine you want to let a calendar app see your contacts from another service. Here is how OAuth 2.0 makes that safe:

  1. You open the calendar app and click "Connect Contacts";
  2. The app redirects you to the contacts service's login page;
  3. You log in and see a screen asking if you want to allow the calendar app to access your contacts;
  4. You approve the request;
  5. The contacts service sends an access token to the calendar app;
  6. The calendar app uses the token to fetch your contacts, without ever seeing your password.

Main OAuth 2.0 Flows

OAuth 2.0 supports several flows, but two are most common:

  • Authorization Code Flow: used by web and mobile apps that can safely store secrets;
  • Client Credentials Flow: used by machine-to-machine communication, where no user is involved.

These flows make sure your data stays secure and only trusted apps can access what you allow.

question mark

Which statement best describes the main purpose of OAuth 2.0

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 4

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain the difference between the Authorization Code Flow and the Client Credentials Flow?

What are some common use cases for OAuth 2.0?

How does OAuth 2.0 keep my data secure?

bookOAuth 2.0 Basics

Свайпніть щоб показати меню

How OAuth 2.0 Works

OAuth 2.0 is a protocol that lets you grant limited access to your resources without sharing your password. Instead of giving out your credentials, you use access tokens to allow applications to act on your behalf.

Access Tokens

An access token is a short-lived string that represents permission to access certain resources. Think of it as a temporary pass you give to an app so it can fetch your data safely.

  • Access tokens are generated by an authorization server;
  • They are sent to the client (the app that wants access);
  • The client uses the token to access protected resources on your behalf.

Basic OAuth 2.0 Flow Example

Imagine you want to let a calendar app see your contacts from another service. Here is how OAuth 2.0 makes that safe:

  1. You open the calendar app and click "Connect Contacts";
  2. The app redirects you to the contacts service's login page;
  3. You log in and see a screen asking if you want to allow the calendar app to access your contacts;
  4. You approve the request;
  5. The contacts service sends an access token to the calendar app;
  6. The calendar app uses the token to fetch your contacts, without ever seeing your password.

Main OAuth 2.0 Flows

OAuth 2.0 supports several flows, but two are most common:

  • Authorization Code Flow: used by web and mobile apps that can safely store secrets;
  • Client Credentials Flow: used by machine-to-machine communication, where no user is involved.

These flows make sure your data stays secure and only trusted apps can access what you allow.

question mark

Which statement best describes the main purpose of OAuth 2.0

Select the correct answer

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 4
some-alt