承接 siddharthbhansali/dev-authkit-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

siddharthbhansali/dev-authkit-php

最新稳定版本:1.2.0

Composer 安装命令:

composer require siddharthbhansali/dev-authkit-php

包简介

README 文档

README

Secure token generation for IntegrationOS AuthKit using Composer.

Install

With composer:

composer require integration-os/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  // file endpoint.php

require "vendor/autoload.php";

use IntegrationOS\AuthKit\AuthKit;

$authkit = new AuthKit("sk_live_12345");
$response = $authkit->create([
	"group" => "meaningful-id", // a meaningful identifier (i.e., organizationId)
	"label" => "Friendly Label", // a human-friendly label (i.e., organizationName)
]);

echo json_encode($response);

Or if you're using Laravel, you can define a route like below:

<?php

use Illuminate\Support\Facades\Route;
use IntegrationOS\AuthKit\AuthKit;

Route::get('/create-embed-token', function () {
    $authkit = new AuthKit("sk_live_12345");
	
    $response = $authkit->create([
        "group" => "meaningful-id", // a meaningful identifier (i.e., organizationId)
        "label" => "Friendly Label", // a human-friendly label (i.e., organizationName)
    ]);
    
    return $response;
});

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.

You'll also want to populate the Group and Label fields depending on how you want to organize and query your users' connected accounts. The Group is especially important as it's used to generate the unique Connection Key for the user once they successfully connect an account.

Full Documentation

Please refer to the official IntegrationOS AuthKit docs for a more holistic understanding of IntegrationOS AuthKit.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2024-07-09