rnewton / opauth_reddit

Opauth的Reddit认证策略

0.1.0 2015-06-30 00:59 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:49:15 UTC


README

Opauth的Reddit认证策略。

基于https://github.com/reddit/reddit/wiki/OAuth2实现

Opauth是一个PHP的多提供者认证框架。

入门指南

  1. 安装Opauth-Reddit

    composer require rnewton/opauth_reddit
  2. 创建Reddit应用https://www.reddit.com/prefs/apps/

    • 确保重定向URI设置为实际的OAuth 2.0回调URL,通常为http://path_to_opauth/reddit/oauth2callback
  3. 配置Opauth-Reddit策略。

  4. 将用户直接导向http://path_to_opauth/reddit进行认证

策略配置

必需参数

<?php
'Reddit' => array(
    'key' => 'YOUR CLIENT ID',
    'secret' => 'YOUR CLIENT SECRET'
)

许可协议

Opauth-Reddit遵循MIT许可协议
版权所有 © 2015 Robert Newton