Skip to contentমূল লেখায় যান

Topic 47 · Courseটপিক 47 · Course

OAuth 2.0 and OpenID Connect

You press "Sign in with your company account" in a new app. A page of the company asks if the app may read your name and your reports. You never type your password into the app. Two standards work behind this screen. They answer two different questions.

8 min read8 মিনিটে পড়া যায় · 10 sections10টি সেকশন · 4 sources4টি সোর্স · updated Nov 2026আপডেট: Nov 2026

The authorization code flowঅথরাইজেশন কোড ফ্লো (authorization code flow)

Follow one sign-in through four lanes, and switch between OAuth and OpenID Connect.চারটি লেন দিয়ে একটি সাইন-ইন অনুসরণ করুন, আর OAuth ও OpenID Connect-এর মধ্যে বদলান।

2 min2 মিনিট7 steps7টি ধাপ
  • Messagesমেসেজ1 / 9
sign inসাইন ইনUserইউজারAppঅ্যাপclientক্লায়েন্টnew secretনতুন সিক্রেটAuthঅথserverসার্ভারAPIAPIresourceরিসোর্স

You’ll learnআপনি শিখবেন

  • Who talks to whom in a sign-inসাইন-ইনে কে কার সঙ্গে কথা বলে✓
  • The app never sees the passwordঅ্যাপ কখনো পাসওয়ার্ড দেখে না
  • Why PKCE protects the codePKCE কেন কোডকে রক্ষা করে
  • OAuth gives access, OIDC adds identityOAuth অ্যাক্সেস দেয়, OIDC পরিচয় যোগ করে

In plain words

OAuth 2.0 is about authorization: what an app may do. It lets a third-party app get limited access to an HTTP service Source 1সোর্স 1. The app does not use your password. It gets an access token, a string for a specific scope, a lifetime, and other access attributes Source 1সোর্স 1.

OpenID Connect (OIDC) is about authentication: who the user is. It is a simple identity layer that sits on OAuth 2.0. It lets a client check the identity of the user, based on the authentication that an authorization server did Source 4সোর্স 4. The layer exists because OAuth 2.0 defines no standard way to give identity information Source 4সোর্স 4.

An access token answers "what may this app do?". An ID token answers "who signed in, and when?".

সহজ English

OAuth 2.0 is about authorization. It decides what an app may do. It lets a third-party app get limited access to an HTTP service Source 1সোর্স 1. The app does not use your password. It gets an access token. An access token is a string. It stands for a specific scope, a lifetime, and other access attributes Source 1সোর্স 1.

OpenID Connect (OIDC) is about authentication. It tells the app who the user is. It is a simple identity layer on top of OAuth 2.0. It lets a client check the identity of the user. It uses the authentication that an authorization server did Source 4সোর্স 4. This layer exists because OAuth 2.0 has no standard way to give identity information Source 4সোর্স 4.

An access token answers "what may this app do?". An ID token answers "who signed in, and when?".

বাংলা ব্যাখ্যা

OAuth 2.0 হলো অথরাইজেশন (authorization) নিয়ে। অর্থাৎ একটি অ্যাপ কী করতে পারবে, তা ঠিক করা। এটি একটি থার্ড-পার্টি অ্যাপকে একটি HTTP সার্ভিসে সীমিত অ্যাক্সেস পেতে দেয় Source 1সোর্স 1। অ্যাপ আপনার পাসওয়ার্ড ব্যবহার করে না। সে একটি অ্যাক্সেস টোকেন (access token) পায়। অ্যাক্সেস টোকেন হলো একটি স্ট্রিং। এটি একটি নির্দিষ্ট স্কোপ, একটি মেয়াদ এবং অন্যান্য অ্যাক্সেস অ্যাট্রিবিউট বোঝায় Source 1সোর্স 1।

OpenID Connect (OIDC) হলো অথেনটিকেশন (authentication) নিয়ে। অর্থাৎ ইউজার কে, তা জানা। এটি OAuth 2.0-এর উপরে একটি সহজ আইডেন্টিটি লেয়ার। এটি ক্লায়েন্টকে ইউজারের পরিচয় যাচাই করতে দেয়। এর ভিত্তি হলো অথরাইজেশন সার্ভারের করা অথেনটিকেশন Source 4সোর্স 4। এই লেয়ার আছে, কারণ OAuth 2.0-এ পরিচয়ের তথ্য দেওয়ার কোনো স্ট্যান্ডার্ড উপায় নেই Source 4সোর্স 4।

অ্যাক্সেস টোকেন উত্তর দেয় "এই অ্যাপ কী করতে পারবে?"। ID টোকেন উত্তর দেয় "কে সাইন ইন করল, আর কখন?"।

When you need it

  • An app needs limited access to a user's data in another service. The user approves it at the authorization server, and the app never sees the password Source 1সোর্স 1.
  • An app needs to log a user in with an identity provider. This is OpenID Connect. The app asks for it with the openid scope Source 4সোর্স 4.

সহজ English

  • An app needs limited access to a user's data in another service. The user approves it at the authorization server. The app never sees the password Source 1সোর্স 1.
  • An app needs to log a user in with an identity provider. This is OpenID Connect. The app asks for it with the openid scope Source 4সোর্স 4.

বাংলা ব্যাখ্যা

  • একটি অ্যাপকে অন্য সার্ভিসে ইউজারের ডেটায় সীমিত অ্যাক্সেস পেতে হবে। ইউজার অথরাইজেশন সার্ভারে তা অনুমোদন করে। অ্যাপ কখনো পাসওয়ার্ড দেখে না Source 1সোর্স 1।
  • একটি অ্যাপকে আইডেন্টিটি প্রোভাইডার দিয়ে ইউজারকে লগইন করাতে হবে। এটি হলো OpenID Connect। অ্যাপ openid স্কোপ দিয়ে এটি চায় Source 4সোর্স 4।

The roles

OAuth defines four roles Source 1সোর্স 1:

RoleJob
Resource ownerCan grant access to a protected resource. Often this is the user.
Resource serverHosts the protected resources and accepts access tokens.
ClientThe app that makes requests for the owner, with the owner's approval. It can run on a server, a desktop, or another device.
Authorization serverIssues access tokens after it authenticates the owner and gets authorization.

In OpenID Connect, the authorization server is an OpenID Provider (OP), and the client is a Relying Party (RP) Source 4সোর্স 4.

সহজ English

OAuth defines four roles Source 1সোর্স 1:

  • Resource owner: can grant access to a protected resource. Often this is the user.
  • Resource server: hosts the protected resources and accepts access tokens.
  • Client: the app that makes requests for the owner, with the owner's approval. It can run on a server, a desktop, or another device.
  • Authorization server: issues access tokens after it authenticates the owner and gets authorization.

In OpenID Connect, the authorization server is an OpenID Provider (OP). The client is a Relying Party (RP) Source 4সোর্স 4.

বাংলা ব্যাখ্যা

OAuth চারটি রোল ঠিক করে Source 1সোর্স 1:

  • রিসোর্স ওনার (Resource owner): সুরক্ষিত রিসোর্সে অ্যাক্সেস দিতে পারে। প্রায়ই এটি ইউজার।
  • রিসোর্স সার্ভার (Resource server): সুরক্ষিত রিসোর্স রাখে এবং অ্যাক্সেস টোকেন গ্রহণ করে।
  • ক্লায়েন্ট (Client): যে অ্যাপ ওনারের হয়ে রিকুয়েস্ট করে, ওনারের অনুমতি নিয়ে। এটি সার্ভার, ডেস্কটপ বা অন্য ডিভাইসে চলতে পারে।
  • অথরাইজেশন সার্ভার (Authorization server): ওনারকে অথেনটিকেট করে এবং অথরাইজেশন পাওয়ার পর অ্যাক্সেস টোকেন দেয়।

OpenID Connect-এ অথরাইজেশন সার্ভার হলো একটি OpenID Provider (OP)। ক্লায়েন্ট হলো একটি Relying Party (RP) Source 4সোর্স 4।

How it works

In the authorization code flow, the client sends the user to the authorization server through the browser. The server sends the user back with a code Source 1সোর্স 1. PKCE adds a secret that only the real client knows Source 2সোর্স 2.

User/browser        Client app           Authorization server      API
     |  1. press sign in|                         |                  |
     |----------------->| make code_verifier,     |                  |
     |                  | code_challenge, state   |                  |
     |  2. redirect to the authorization endpoint |                  |
     |<-----------------|                         |                  |
     |  3. request: response_type=code, client_id, redirect_uri,    |
     |     scope (openid ...), state, code_challenge, method        |
     |------------------------------------------->|                  |
     |  4. user signs in and approves             |                  |
     |  5. redirect back with code and state      |                  |
     |----------------->|                         |                  |
     |                  | 6. token request:       |                  |
     |                  |    code + code_verifier |                  |
     |                  |------------------------>| compare verifier |
     |                  | 7. access token         |  with challenge  |
     |                  |    (+ ID token, OIDC)   |                  |
     |                  |<------------------------|                  |
     |                  | 8. call API with access token              |
     |                  |------------------------------------------->|

The request. It has response_type=code, the client_id, and often a redirect_uri and a scope. The state value is recommended Source 1সোর্স 1. The server may ignore part of the scope. Then it must report the granted scope Source 1সোর্স 1.

The code. It must expire shortly (10 minutes at most is recommended). If a code is used twice, the server must refuse the request. It should also revoke, when possible, the tokens that came from that code Source 1সোর্স 1. The state value comes back unchanged, so the client can block cross-site request forgery Source 1সোর্স 1.

PKCE. Public clients, such as phone apps, can lose a code to a malicious app on the same device Source 2সোর্স 2. So the client makes a new secret, the code_verifier, for each request. It sends a transformed value, the code_challenge, in the authorization request, and the verifier itself in the token request. The server transforms the verifier and compares. It denies access if the values differ Source 2সোর্স 2. The S256 method hashes the verifier with SHA-256 and encodes it with base64url Source 2সোর্স 2. A thief who has only the code cannot redeem it Source 2সোর্স 2.

সহজ English

In the authorization code flow, the client sends the user to the authorization server through the browser. The server sends the user back with a code Source 1সোর্স 1. PKCE adds a secret that only the real client knows Source 2সোর্স 2.

The request. It has response_type=code, the client_id, and often a redirect_uri and a scope. The state value is recommended Source 1সোর্স 1. The server may ignore part of the scope. Then it must report the granted scope Source 1সোর্স 1.

The code. It must expire shortly. The spec recommends 10 minutes at most. If a code is used twice, the server must refuse the request. It should also revoke, when possible, the tokens that came from that code Source 1সোর্স 1. The state value comes back unchanged. So the client can block cross-site request forgery Source 1সোর্স 1.

PKCE. Public clients, such as phone apps, can lose a code to a malicious app on the same device Source 2সোর্স 2. So the client makes a new secret, the code_verifier, for each request. It sends a transformed value, the code_challenge, in the authorization request. It sends the verifier itself in the token request. The server transforms the verifier and compares. It denies access if the values differ Source 2সোর্স 2. The S256 method hashes the verifier with SHA-256 and encodes it with base64url Source 2সোর্স 2. A thief who has only the code cannot redeem it Source 2সোর্স 2.

বাংলা ব্যাখ্যা

অথরাইজেশন কোড ফ্লো (authorization code flow)-তে ক্লায়েন্ট ব্রাউজার দিয়ে ইউজারকে অথরাইজেশন সার্ভারে পাঠায়। সার্ভার ইউজারকে একটি কোড দিয়ে ফেরত পাঠায় Source 1সোর্স 1। PKCE একটি সিক্রেট যোগ করে, যা শুধু আসল ক্লায়েন্ট জানে Source 2সোর্স 2।

রিকুয়েস্ট। এতে থাকে response_type=code, client_id, এবং প্রায়ই একটি redirect_uri ও একটি scope। state মান থাকার পরামর্শ দেওয়া হয়েছে Source 1সোর্স 1। সার্ভার স্কোপের কিছু অংশ উপেক্ষা করতে পারে। তখন তাকে দেওয়া স্কোপ জানাতে হবে Source 1সোর্স 1।

কোড। কোডের মেয়াদ অল্প সময়ের মধ্যে শেষ হতে হবে। স্পেসিফিকেশন সর্বোচ্চ 10 মিনিটের পরামর্শ দেয়। একটি কোড দুবার ব্যবহার হলে সার্ভারকে রিকুয়েস্ট প্রত্যাখ্যান করতে হবে। সম্ভব হলে সেই কোড থেকে পাওয়া টোকেনগুলোও বাতিল করা উচিত Source 1সোর্স 1। state মান অপরিবর্তিত ফেরত আসে। তাই ক্লায়েন্ট ক্রস-সাইট রিকুয়েস্ট ফোর্জারি (cross-site request forgery) ঠেকাতে পারে Source 1সোর্স 1।

PKCE। ফোন অ্যাপের মতো পাবলিক ক্লায়েন্ট একই ডিভাইসের ক্ষতিকর অ্যাপের কাছে কোড হারাতে পারে Source 2সোর্স 2। তাই ক্লায়েন্ট প্রতিটি রিকুয়েস্টের জন্য একটি নতুন সিক্রেট বানায়, নাম code_verifier। অথরাইজেশন রিকুয়েস্টে সে একটি রূপান্তরিত মান পাঠায়, নাম code_challenge। টোকেন রিকুয়েস্টে সে ভেরিফায়ার নিজেই পাঠায়। সার্ভার ভেরিফায়ার রূপান্তর করে মিলিয়ে দেখে। মান না মিললে সে অ্যাক্সেস দেয় না Source 2সোর্স 2। S256 পদ্ধতি ভেরিফায়ারকে SHA-256 দিয়ে হ্যাশ করে এবং base64url দিয়ে এনকোড করে Source 2সোর্স 2। যে চোরের কাছে শুধু কোড আছে, সে তা ভাঙিয়ে টোকেন নিতে পারে না Source 2সোর্স 2।

Adding OpenID Connect

With OpenID Connect. The request includes the openid scope Source 4সোর্স 4. The response also has an ID token: a JSON Web Token (JWT) with claims about the sign-in Source 4সোর্স 4.

Required claims include:

  • iss (the issuer),
  • sub (a user id, unique at that issuer and never reassigned),
  • aud (the audience, which must contain the client's client_id),
  • exp (the expiry), and
  • iat (the issue time).

If the client sent a nonce, the nonce claim must equal that value Source 4সোর্স 4. The client must check the issuer, the audience, the expiry, the signature, and the nonce when one was sent. The spec lets TLS to the token endpoint stand in for the signature check Source 4সোর্স 4.

সহজ English

With OpenID Connect. The request includes the openid scope Source 4সোর্স 4. The response also has an ID token. It is a JSON Web Token (JWT) with claims about the sign-in Source 4সোর্স 4. Required claims include:

  • iss: the issuer.
  • sub: a user id, unique at that issuer and never reassigned.
  • aud: the audience, which must contain the client_id of the client.
  • exp: the expiry.
  • iat: the issue time.

If the client sent a nonce, the nonce claim must equal that value Source 4সোর্স 4. The client must check the issuer, the audience, the expiry, the signature, and the nonce when one was sent. The spec lets TLS to the token endpoint stand in for the signature check Source 4সোর্স 4.

বাংলা ব্যাখ্যা

OpenID Connect-এর সঙ্গে। রিকুয়েস্টে openid স্কোপ থাকে Source 4সোর্স 4। রেসপন্সে একটি ID টোকেনও থাকে। এটি একটি JSON Web Token (JWT), যাতে সাইন-ইন সম্পর্কে ক্লেইম (claim) থাকে Source 4সোর্স 4। আবশ্যক ক্লেইমের মধ্যে আছে iss (ইস্যুয়ার), sub (ইউজার আইডি, যা সেই ইস্যুয়ারে ইউনিক এবং কখনো নতুন করে দেওয়া হয় না), aud (অডিয়েন্স, যাতে ক্লায়েন্টের client_id থাকতেই হবে), exp (মেয়াদ শেষের সময়) এবং iat (ইস্যুর সময়)। ক্লায়েন্ট nonce পাঠালে nonce ক্লেইমের মান তার সমান হতে হবে Source 4সোর্স 4। ক্লায়েন্টকে ইস্যুয়ার, অডিয়েন্স, মেয়াদ ও সিগনেচার যাচাই করতে হবে, আর nonce পাঠানো হলে সেটিও যাচাই করতে হবে। স্পেসিফিকেশন টোকেন এন্ডপয়েন্টে TLS-কে সিগনেচার যাচাইয়ের বিকল্প হিসেবে মেনে নেওয়ার অনুমতি দেয় Source 4সোর্স 4।

What the best practice says

RFC 9700 updates the advice of RFC 6749 Source 3সোর্স 3. It says:

  • Public clients must use PKCE. For confidential clients it is recommended Source 3সোর্স 3.
  • Clients should use S256, because it does not show the verifier in the request Source 3সোর্স 3.
  • Clients must prevent cross-site request forgery. They may rely on PKCE if the server supports it, or on the OpenID Connect nonce. Otherwise they must use a one-time state value Source 3সোর্স 3.
  • The server must compare redirect URIs by exact string matching. Only the port of a native app's localhost URI may differ Source 3সোর্স 3.
  • Clients should not use the implicit grant, which puts the access token in the authorization response. The spec calls it open to token leakage and replay. It makes an exception when injection is prevented and the leak paths are closed. Use the code response type instead Source 3সোর্স 3.
  • The password grant must not be used, because it shows the user's credentials to the client Source 3সোর্স 3.

সহজ English

RFC 9700 updates the advice of RFC 6749 Source 3সোর্স 3. It says:

  • Public clients must use PKCE. For confidential clients it is recommended Source 3সোর্স 3.
  • Clients should use S256. It does not show the verifier in the request Source 3সোর্স 3.
  • Clients must prevent cross-site request forgery. They may rely on PKCE if the server supports it. They may rely on the OpenID Connect nonce. Otherwise they must use a one-time state value Source 3সোর্স 3.
  • The server must compare redirect URIs by exact string matching. Only the port of a native app's localhost URI may differ Source 3সোর্স 3.
  • Clients should not use the implicit grant. It puts the access token in the authorization response. The spec calls it open to token leakage and replay. It makes an exception when injection is prevented and the leak paths are closed. Use the code response type instead Source 3সোর্স 3.
  • The password grant must not be used. It shows the user's credentials to the client Source 3সোর্স 3.

বাংলা ব্যাখ্যা

RFC 9700 RFC 6749-এর পরামর্শ হালনাগাদ করে Source 3সোর্স 3। এতে বলা আছে:

  • পাবলিক ক্লায়েন্টকে PKCE ব্যবহার করতেই হবে। কনফিডেনশিয়াল ক্লায়েন্টের জন্য এর পরামর্শ দেওয়া হয়েছে Source 3সোর্স 3।
  • ক্লায়েন্টের S256 ব্যবহার করা উচিত। এটি রিকুয়েস্টে ভেরিফায়ার দেখায় না Source 3সোর্স 3।
  • ক্লায়েন্টকে ক্রস-সাইট রিকুয়েস্ট ফোর্জারি ঠেকাতে হবে। সার্ভার সমর্থন করলে তারা PKCE-এর উপর নির্ভর করতে পারে। তারা OpenID Connect-এর nonce-এর উপরও নির্ভর করতে পারে। না হলে তাদের একবার-ব্যবহারের state মান ব্যবহার করতে হবে Source 3সোর্স 3।
  • সার্ভারকে রিডাইরেক্ট URI হুবহু স্ট্রিং মিলিয়ে তুলনা করতে হবে। শুধু নেটিভ অ্যাপের localhost URI-র পোর্ট ভিন্ন হতে পারে Source 3সোর্স 3।
  • ক্লায়েন্টের ইমপ্লিসিট গ্রান্ট (implicit grant) ব্যবহার করা উচিত নয়। এটি অথরাইজেশন রেসপন্সে অ্যাক্সেস টোকেন রাখে। স্পেসিফিকেশন একে টোকেন লিক ও রিপ্লের জন্য খোলা বলে। ইনজেকশন ঠেকানো থাকলে এবং লিকের পথ বন্ধ থাকলে সে একটি ব্যতিক্রম রাখে। তার বদলে কোড রেসপন্স টাইপ ব্যবহার করুন Source 3সোর্স 3।
  • পাসওয়ার্ড গ্রান্ট ব্যবহার করা যাবে না। এটি ইউজারের ক্রেডেনশিয়াল ক্লায়েন্টকে দেখায় Source 3সোর্স 3।

A real-life example

This example is the tutorial's own. A test-reporting web app lets testers sign in with the company account. It asks for the scopes openid and reports:read. The tester signs in on the company page and approves. The app gets a code. It sends the code and the PKCE verifier to the server and gets back two tokens: an ID token and an access token.

The app reads the ID token to show who signed in, and sends the access token to the reports API.

সহজ English

This example is the tutorial's own. A test-reporting web app lets testers sign in with the company account. It asks for the scopes openid and reports:read. The tester signs in on the company page and approves. The app gets a code. It sends the code and the PKCE verifier to the server. It gets back two tokens: an ID token and an access token.

The app reads the ID token to show who signed in. It sends the access token to the reports API.

বাংলা ব্যাখ্যা

এই উদাহরণ টিউটোরিয়ালের নিজের। একটি টেস্ট-রিপোর্টিং ওয়েব অ্যাপ টেস্টারদের কোম্পানির অ্যাকাউন্ট দিয়ে সাইন ইন করতে দেয়। সে openid ও reports:read স্কোপ চায়। টেস্টার কোম্পানির পেজে সাইন ইন করে এবং অনুমোদন দেয়। অ্যাপ একটি কোড পায়। সে কোড ও PKCE ভেরিফায়ার সার্ভারকে পাঠায়। সে দুটি টোকেন ফেরত পায়: একটি ID টোকেন ও একটি অ্যাক্সেস টোকেন।

অ্যাপ কে সাইন ইন করল তা দেখাতে ID টোকেন পড়ে। সে অ্যাক্সেস টোকেন reports API-কে পাঠায়।

Common mistakes

সহজ English

বাংলা ব্যাখ্যা

  • শুধু OAuth-কে লগইন হিসেবে ব্যবহার করা। কে অথেনটিকেট করেছে, সে সম্পর্কে OAuth 2.0 কোনো স্ট্যান্ডার্ড তথ্য দেয় না Source 4সোর্স 4। OpenID Connect যোগ করুন।
  • দুটি টোকেন গুলিয়ে ফেলা। ID টোকেন ক্লায়েন্টের জন্য। এর aud-এ ক্লায়েন্টের আইডি থাকতেই হবে Source 4সোর্স 4। অ্যাক্সেস টোকেন রিসোর্স সার্ভারের জন্য Source 1সোর্স 1। প্রতিটিকে তার নিজের কাজে ব্যবহার করুন (টিউটোরিয়ালের পরামর্শ)।
  • সেরা চর্চা (best practice) উপেক্ষা করা। PKCE ছাড়া পাবলিক ক্লায়েন্ট, CSRF থেকে সুরক্ষা না থাকা, ঢিলেঢালা রিডাইরেক্ট URI মেলানো এবং পাসওয়ার্ড গ্রান্ট এর বাধ্যতামূলক ("must") নিয়ম ভাঙে। ইমপ্লিসিট গ্রান্ট এর পরামর্শের বিরুদ্ধে যায় Source 3সোর্স 3।
  • ID টোকেন যাচাই না করা। ক্লায়েন্টকে তা যাচাই করতেই হবে Source 4সোর্স 4।

What a tester can check

Tutorial advice

These checks are the tutorial's own advice, not a claim of a source. Run them only on systems that you may test.

  • Read the first request. Look for a code_challenge with S256 and a new state at each login.
  • Wrong verifier. Send the code with no verifier or a wrong one. The token request should fail.
  • Use a code twice. The second use should fail.
  • Change the redirect URI. Even one character of difference should be refused.
  • Scope. Ask for less. Call an API that needs more. The API should refuse.
  • Expiry. Let both tokens expire. Check what the user sees.
  • ID token checks. In a test provider that you control, make tokens with a wrong audience, issuer, expiry, or nonce. The client should reject each one.
  • User says no. Deny the approval and read the message.

সহজ English

These checks are the tutorial's own advice, not a claim of a source. Run them only on systems that you may test.

  • Read the first request. Look for a code_challenge with S256 and a new state at each login.
  • Wrong verifier. Send the code with no verifier or a wrong one. The token request should fail.
  • Use a code twice. The second use should fail.
  • Change the redirect URI. Even one character of difference should be refused.
  • Scope. Ask for less. Call an API that needs more. The API should refuse.
  • Expiry. Let both tokens expire. Check what the user sees.
  • ID token checks. In a test provider that you control, make tokens with a wrong audience, issuer, expiry, or nonce. The client should reject each one.
  • User says no. Deny the approval and read the message.

বাংলা ব্যাখ্যা

এই চেকগুলো টিউটোরিয়ালের নিজের পরামর্শ, কোনো সোর্সের দাবি নয়। এগুলো শুধু সেই সিস্টেমে চালান, যা টেস্ট করার অনুমতি আপনার আছে।

  • প্রথম রিকুয়েস্ট পড়ুন। S256 সহ একটি code_challenge এবং প্রতিটি লগইনে একটি নতুন state খুঁজুন।
  • ভুল ভেরিফায়ার। ভেরিফায়ার ছাড়া বা ভুল ভেরিফায়ার দিয়ে কোড পাঠান। টোকেন রিকুয়েস্ট ব্যর্থ হওয়া উচিত।
  • একটি কোড দুবার ব্যবহার করুন। দ্বিতীয়বার ব্যর্থ হওয়া উচিত।
  • রিডাইরেক্ট URI বদলান। এমনকি এক অক্ষরের পার্থক্যও প্রত্যাখ্যান হওয়া উচিত।
  • স্কোপ। কম চান। যে API-র বেশি দরকার, তা কল করুন। API-র উচিত রিকুয়েস্ট প্রত্যাখ্যান করা।
  • মেয়াদ শেষ। দুটি টোকেনকেই মেয়াদ শেষ হতে দিন। ইউজার কী দেখে, তা দেখুন।
  • ID টোকেন যাচাই। আপনার নিয়ন্ত্রণের একটি টেস্ট প্রোভাইডারে ভুল অডিয়েন্স, ইস্যুয়ার, মেয়াদ বা nonce সহ টোকেন বানান। ক্লায়েন্টের উচিত প্রতিটি টোকেন প্রত্যাখ্যান করা।
  • ইউজার না বললে। অনুমোদন প্রত্যাখ্যান করুন এবং মেসেজ পড়ুন।

Key words

WordMeaning
AuthorizationDeciding what an app may do. OAuth 2.0 covers this Source 1সোর্স 1
AuthenticationProving who the user is. OpenID Connect adds this on top of OAuth 2.0 Source 4সোর্স 4
Resource ownerThe one who can grant access to a protected resource Source 1সোর্স 1
ClientThe app that asks for access on the owner's behalf Source 1সোর্স 1
Authorization serverThe server that issues access tokens Source 1সোর্স 1
Access tokenA string that stands for a scope and a lifetime of access, usually opaque to the client Source 1সোর্স 1
ScopeA list of strings, defined by the server, that say what access the app asks for Source 1সোর্স 1
Authorization codeA short-lived, single-use value that the client swaps for tokens Source 1সোর্স 1
PKCEA per-request secret that ties the code to the client that asked for it Source 2সোর্স 2
code_verifierThe secret that the client makes and sends in the token request Source 2সোর্স 2
code_challengeThe transformed verifier that the client sends in the authorization request Source 2সোর্স 2
stateA value that comes back unchanged, used against cross-site request forgery Source 1সোর্স 1
ID tokenA JWT with claims about the sign-in of the user Source 4সোর্স 4
Relying PartyThe client of an OpenID Provider Source 4সোর্স 4
nonceA value that links a client session to an ID token Source 4সোর্স 4
Implicit grantA flow that gives the access token in the authorization response. The best practice recommends against it Source 3সোর্স 3
  1. [1]
    RFC 6749: The OAuth 2.0 Authorization Framework

    IETF · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  2. [2]
    RFC 7636: Proof Key for Code Exchange by OAuth Public Clients

    IETF · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  3. [3]
    RFC 9700: Best Current Practice for OAuth 2.0 Security

    IETF · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  4. [4]
    OpenID Connect Core 1.0

    OpenID Foundation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22