PHPackages                             dragosgaftoneanu/okta-oidc-flows-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dragosgaftoneanu/okta-oidc-flows-php

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

dragosgaftoneanu/okta-oidc-flows-php
====================================

Library used to integrate Okta OIDC Flows inside PHP applications.

1.0.1(5y ago)010MITPHPPHP &gt;=5.0

Since Mar 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dragosgaftoneanu/okta-oidc-flows-php)[ Packagist](https://packagist.org/packages/dragosgaftoneanu/okta-oidc-flows-php)[ RSS](/packages/dragosgaftoneanu-okta-oidc-flows-php/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Okta OIDC Flows PHP
===================

[](#okta-oidc-flows-php)

This repository contains the source for the Okta OIDC PHP library that can be used to login your users using [Authorization Code Flow](https://developer.okta.com/docs/guides/implement-auth-code/overview/), [Authorization Code Flow with PKCE](https://developer.okta.com/docs/guides/implement-auth-code-pkce/overview/) or [Resource Owner Password Flow](https://developer.okta.com/docs/guides/implement-password/overview/) inside your PHP application.

⚠️ **Disclaimer:** This is not an official product and does not qualify for Okta Support.

Installation
------------

[](#installation)

You can install this library by running the following command through Composer

```
composer require dragosgaftoneanu/okta-oidc-flows-php

```

Requirements
------------

[](#requirements)

- An Okta account, called an *organization* (you can sign up for a free [developer organization](https://developer.okta.com/signup/))
- A local web server that runs PHP 5.0+
- [cURL library](https://www.php.net/manual/en/book.curl.php) available for usage

Authorization Code Flow methods
-------------------------------

[](#authorization-code-flow-methods)

### setClientId($client\_id)

[](#setclientidclient_id)

This method sets the client ID used for authorization code flow.

### setClientSecret($client\_secret)

[](#setclientsecretclient_secret)

This method sets the client secret used for authorization code flow.

### setRedirectUri($redirect\_uri)

[](#setredirecturiredirect_uri)

This method sets the redirect uri used for authorization code flow.

### setIssuer($issuer)

[](#setissuerissuer)

This method sets the issuer used for authorization code flow.

### setScopes($scopes)

[](#setscopesscopes)

This method sets the scopes used for authorization code flow.

### setState($state)

[](#setstatestate)

This method sets the state used for authorization code flow.

### setNonce($nonce)

[](#setnoncenonce)

This method sets the nonce used for authorization code flow.

### parseAuthCode($code, $state, $error, $full=true)

[](#parseauthcodecode-state-error-fulltrue)

This method takes the authorization code, state, error parameters from either `GET` or `POST` in order to further process the flow. If `$full` is set to true, then the result will contain also the details from /introspect and /userinfo endpoint, otherwise it will return only the JWT tokens received after exchanging the code.

Authorization Code Flow with PKCE methods
-----------------------------------------

[](#authorization-code-flow-with-pkce-methods)

### setClientId($client\_id)

[](#setclientidclient_id-1)

This method sets the client ID used for authorization code flow with PKCE.

### setRedirectUri($redirect\_uri)

[](#setredirecturiredirect_uri-1)

This method sets the redirect uri used for authorization code flow with PKCE.

### setIssuer($issuer)

[](#setissuerissuer-1)

This method sets the issuer used for authorization code flow with PKCE.

### setScopes($scopes)

[](#setscopesscopes-1)

This method sets the scopes used for authorization code flow with PKCE.

### setState($state)

[](#setstatestate-1)

This method sets the state used for authorization code flow with PKCE.

### setNonce($nonce)

[](#setnoncenonce-1)

This method sets the nonce used for authorization code flow with PKCE.

### setCodeVerifier($code\_verifier)

[](#setcodeverifiercode_verifier)

This method sets the code verifier used for authorization code flow with PKCE.

### parseAuthCode($code, $state, $error, $full=true)

[](#parseauthcodecode-state-error-fulltrue-1)

This method takes the authorization code, state, error parameters from either `GET` or `POST` in order to further process the flow. If `$full` is set to true, then the result will contain also the details from /introspect and /userinfo endpoint, otherwise it will return only the JWT tokens received after exchanging the code.

Resource Owner PAssword Flow methods
------------------------------------

[](#resource-owner-password-flow-methods)

### setClientId($client\_id)

[](#setclientidclient_id-2)

This method sets the client ID used for resource owner password flow.

### setClientSecret($client\_secret)

[](#setclientsecretclient_secret-1)

This method sets the client secret used for resource owner password flow.

### setIssuer($issuer)

[](#setissuerissuer-2)

This method sets the issuer used for resource owner password flow.

### setScopes($scopes)

[](#setscopesscopes-2)

This method sets the scopes used for resource owner password flow.

### setUsername($username)

[](#setusernameusername)

This method sets the username used for resource owner password flow.

### setPassword($password)

[](#setpasswordpassword)

This method sets the password used for resource owner password flow.

### getTokens($full=true)

[](#gettokensfulltrue)

This method sends the request to the /token endpoint and retrieves the JWT tokens. If `$full` is set to true, then the result will contain also the details from /introspect and /userinfo endpoint, otherwise it will return only the JWT tokens received after exchanging the code.

Bugs?
-----

[](#bugs)

If you find a bug or encounter an issue when using the library, please open an issue on GitHub [here](https://github.com/dragosgaftoneanu/okta-oidc-flows-php/issues) and it will be further investigated.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1876d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1df2b44090e02ecbc105085659246363dc3e51ad22da0aaa96a1b6f39e8271a1?d=identicon)[dragosgaftoneanu](/maintainers/dragosgaftoneanu)

---

Top Contributors

[![dragosgaftoneanu](https://avatars.githubusercontent.com/u/43792974?v=4)](https://github.com/dragosgaftoneanu "dragosgaftoneanu (4 commits)")

### Embed Badge

![Health badge](/badges/dragosgaftoneanu-okta-oidc-flows-php/health.svg)

```
[![Health](https://phpackages.com/badges/dragosgaftoneanu-okta-oidc-flows-php/health.svg)](https://phpackages.com/packages/dragosgaftoneanu-okta-oidc-flows-php)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
