Authentication

Authentication vs. Authorization: Differences, Examples and How They Work Together

Authentication verifies who an identity is; authorization determines what that identity may do. A user might authenticate with a passkey or enterprise SSO, then be authorized to view one tenant’s invoices but not change its security settings. The two controls work together, but they solve different problems and should not share the same decision logic.

Authentication vs. authorization at a glance

Question Authentication Authorization
Purpose Verify an identity Evaluate access to an action or resource
Typical input Password, passkey, OTP, certificate or IdP assertion Identity, active tenant, role, permission, attribute, relationship or entitlement
Output An authenticated session or identity context Allow, deny or a constrained decision
Common standards and models OpenID Connect, SAML, WebAuthn OAuth 2.0 scopes, RBAC, ABAC, ReBAC, policy engines
When it happens Usually at sign-in and again when risk or policy requires On every protected operation, including after sign-in
B2B SaaS example Confirm that Dana controls the identity dana@example.com Permit Dana to manage users in Tenant A but only view reports in Tenant B

What is authentication?

Authentication is the process of verifying that a person or workload controls an authenticator bound to a claimed identity. Passwords, passkeys, one-time codes, authenticator apps, client certificates and signed assertions from an identity provider can all participate in authentication.

A successful authentication commonly establishes a session. The application may keep that session server-side and use a secure cookie as an identifier, or it may accept identity and access tokens issued by a trusted authorization server. A token is evidence carried between systems; it does not remove the need to validate issuer, audience, signature, expiry and the claims required by the application.

Authentication factors are not authentication protocols

Factors describe the evidence used: something a user knows, has or is. Multi-factor authentication combines evidence from more than one factor category. Passwordless authentication simply means the user does not type a password; it may be single-factor or multi-factor depending on the method and policy.

Protocols solve a different problem. OpenID Connect lets a client verify an authentication performed by an authorization server. SAML carries assertions between an enterprise identity provider and service provider. WebAuthn defines public-key authentication for the web. OAuth 2.0 is an authorization framework and is not, by itself, a user-authentication protocol.

What is authorization?

Authorization evaluates whether an identity may perform an action on a resource in the current context. The decision may consider roles, permissions, attributes, relationships, commercial entitlements, resource ownership, tenant membership and environmental signals.

Common approaches include:

  • Role-based access control (RBAC): permissions are assigned to roles, and roles are assigned to users or groups.
  • Attribute-based access control (ABAC): policy evaluates attributes of the subject, resource, action and environment. The policy—not a rule that every attribute must be true—determines the result.
  • Relationship-based access control (ReBAC): access follows relationships such as owner, member, parent account or project collaborator.
  • Entitlement checks: commercial packaging and grants determine whether a tenant or user can use a product capability.

OAuth 2.0 can delegate access to protected APIs through access tokens and scopes. It does not replace the application’s resource-level authorization model. An API still needs to decide whether the token’s subject may perform the requested operation on the specific object.

Five key differences

1. Identity proof versus access decision

Authentication asks whether the presented evidence belongs to the claimed identity. Authorization asks whether that identity is allowed to take the requested action. A valid session is input to an access decision, not a universal permission.

2. Authenticators versus policy context

Authentication examines credentials and authenticators. Authorization examines application context: tenant membership, role, permission, entitlement, resource ownership and policy conditions.

3. Session establishment versus continuous enforcement

Authentication often occurs at sign-in and may recur for sensitive actions, elevated risk or expired assurance. Authorization normally happens whenever a protected resource is accessed. Caching decisions can improve latency, but tenant, policy and revocation boundaries must remain correct.

4. Central identity service versus distributed enforcement points

An identity provider can centralize authentication. Authorization policy may also be centralized, but enforcement still occurs wherever protected actions are performed: APIs, services, background jobs and administrative interfaces.

5. Different failure consequences

An authentication failure should not create a session. An authorization failure should deny the specific operation without silently changing identity state. Combining the two can create dangerous bugs—for example, disabling a global identity when only one tenant membership should be removed.

How they work together

A typical protected request follows this sequence:

  1. The user authenticates directly or through an enterprise identity provider.
  2. The application establishes a session and identifies the active tenant.
  3. The client requests a protected operation.
  4. The server validates the session or access token.
  5. The authorization layer evaluates the subject, tenant, action, resource and relevant policy.
  6. The service allows, denies or constrains the operation and records useful audit context.

Authentication usually precedes authorization for private application actions. It is not an absolute rule: public resources can be authorized for anonymous users, and continuous policy evaluation can change access after the initial login.

B2B SaaS example: one identity, two tenants

Suppose Lee belongs to Acme as an administrator and Globex as a report viewer.

  • Authentication verifies Lee once through a passkey or Acme’s enterprise IdP.
  • Tenant selection determines which membership is active.
  • Authorization permits user administration when Lee acts in Acme.
  • The same user is denied that action in Globex but may view reports there.
  • Removing Lee from Globex should remove the Globex membership and access without deleting the global identity or Acme membership. Existing-token invalidation is a separate control; the application should continue checking current membership and follow its documented revocation policy.

This separation is why multi-tenant systems should model identity, organization membership, role and entitlement independently.

Implementation checklist

  • Keep authentication, tenant membership and authorization records separate.
  • Validate sessions and tokens on the server; never trust client-side role checks as enforcement.
  • Include the active tenant in every authorization decision and cache key.
  • Deny by default when required identity or policy context is missing.
  • Use step-up authentication when a sensitive action needs fresher or stronger assurance.
  • Test cross-tenant negative cases, not only successful access paths.
  • Revoke affected sessions and cached decisions when membership or policy changes.
  • Log enough context to explain who requested what, for which tenant and why it was allowed or denied.
  • Use established OIDC, SAML, WebAuthn and OAuth libraries rather than implementing protocol validation from scratch.

Authentication and authorization with Frontegg

Frontegg’s public documentation covers password, passwordless, passkey, MFA, SAML and OIDC authentication, along with session controls. Each tenant can configure its own SAML or OIDC connection, while account administrators can enforce stricter MFA requirements through the self-service portal when the Security module is enabled.

Frontegg token templates include the active tenantId and can include roles and permissions drawn from the active tenant. Users who belong to multiple tenants can switch the active tenant through the SDK. The application should validate the token and include tenantId, current membership, action and resource ownership in each authorization decision; roles alone are not a cross-tenant authorization boundary.

For sensitive operations, Frontegg’s step-up authentication flow uses acr, amr and auth_time claims to request additional verification or fresh authentication. Applications still define which operations require step-up, their resources and business rules, and where authorization is enforced.

Review the authentication product overview, authorization and entitlements, and the developer documentation for JWT claims, tenant switching, account-level MFA and step-up authentication before choosing an implementation pattern.

References