happytodev/authentik 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

happytodev/authentik

最新稳定版本:v1.0.0

Composer 安装命令:

composer require happytodev/authentik

包简介

A package for TempestPHP to handle OAuth authentication with providers like GitHub, Amazon and others to come.

README 文档

README

A package for TempestPHP to handle OAuth authentication with providers like

  • GitHub
  • Google
  • X
  • Amazon

Prerequisites

  • TempestPHP installed
  • TempestPHP Auth package installed
  • Database setup
  • OAuth provider credentials (Client ID, Client Secret, Redirect URI)

Installation

You can install the package via composer:

composer require happytodev/authentik

As Tempest Auth User's model is final, you need to extend it and add the OauthFieldsTrait to your User model.

Just add the following use OauthFieldsTrait; to your User model:

final class User implements CanAuthenticate, CanAuthorize
{
    use IsDatabaseModel;
    use OauthFieldsTrait; // Add the trait here
    ...

Migration

Run the following command to add the necessary database fields:

php tempest migrate:up

.env settings

Configure your .env file with the necessary settings:

# Possible values: local, staging, production, ci, testing, other
ENVIRONMENT=local

# The base URI that's used for all generated URIs
BASE_URI=https://mytempestsite.test


GITHUB_CLIENT_ID=Ov23liz.............
GITHUB_CLIENT_SECRET=14a...................................
GITHUB_REDIRECT_URI=${BASE_URI}/auth/github/callback

AMAZON_CLIENT_ID='amzn1.application-oa2-client.ca50............................'
AMAZON_CLIENT_SECRET='amzn1.oa2-cs.v1.ed9a............................................................'
AMAZON_REDIRECT_URI=${BASE_URI}/auth/amazon/callback

# After success oauth authentication, route to redirect to
AUTHENTIK_REDIRECT_URI=${BASE_URI}/admin

Usage

Create link to the login page in your view by calling the following address :

License

The MIT License (MIT). Please see License File for more information.

Credits

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-06