https://github.com/picahq/authkit-php
Secure token generation for IntegrationOS AuthKit in PHP
https://github.com/picahq/authkit-php
Last synced: 24 days ago
JSON representation
Secure token generation for IntegrationOS AuthKit in PHP
- Host: GitHub
- URL: https://github.com/picahq/authkit-php
- Owner: picahq
- License: gpl-3.0
- Created: 2024-06-17T15:11:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-08T17:39:56.000Z (about 1 year ago)
- Last Synced: 2025-04-14T10:05:18.716Z (9 months ago)
- Language: PHP
- Homepage: https://docs.integrationos.com/docs/authkit
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# authkit-php
Secure token generation for [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit)
using [Composer](https://getcomposer.org/).
## Install
With composer:
```bash
composer require integrationos/authkit-php
```
## Creating a token endpoint
You'll want to create an internal endpoint used to generate secure tokens for your frontend. You can do so by
adding code that looks like the below snippet. You can then call the file directly in the browser or using a tool like
curl or Postman by making a POST request to http://yourserver.com/endpoint.php.
```php
create();
echo json_encode($token);
```
Or if you're using Laravel, you can define a route like below:
```php
create();
return $token;
});
```
You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to
make available to your users.
If you pass an `identity` or `identityType` (`user`, `team`, or `organization`), you'll be able to query for all connections scoped to that identity.
The identity is used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.
## Full Documentation
Please refer to the official [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) docs for a more
holistic understanding of IntegrationOS AuthKit.