PHPackages                             indielogin/client - 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. indielogin/client

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

indielogin/client
=================

IndieLogin Client Library

1.0.0(5y ago)126Apache-2.0PHPPHP &gt;7.2.0

Since Nov 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/aaronpk/indielogin-client-php)[ Packagist](https://packagist.org/packages/indielogin/client)[ RSS](/packages/indielogin-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

IndieLogin Client
=================

[](#indielogin-client)

This is a helper library to use with services like IndieLogin.com. That service provides an API that works very similar to the [IndieAuth](https://indieauth.net) protocol, but can authenticate users with a number of different methods, including IndieAuth, email, PGP keys, GitHub and Twitter.

When users log in with this library, it will first check their website for an authorization endpoint and do an IndieAuth flow directly if found. Otherwise, it will redirect them to the configured server to authenticate there.

Usage
-----

[](#usage)

### Create a Login Form

[](#create-a-login-form)

You'll first need to create a login form to prompt the user to enter their website address. This might look something like the HTML below.

```

```

### Begin the Login Flow

[](#begin-the-login-flow)

In the `login.php` file, you'll need to initialize the session, and tell this library to discover the user's endpoints. If everything succeeds, the library will return a URL that you can use to redirect the user to begin the flow.

The example below will have some really basic error handling, which you'll probably want to replace with something nicer looking.

Example `login.php` file:

```
