eduzz/accounts-laravel-adapter

Pacote de integração do Eduzz Account com o Laravel Jetstream.

Package info

github.com/eduzz/accounts-laravel-adapter

pkg:composer/eduzz/accounts-laravel-adapter

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 2

v1.35 2023-03-09 16:58 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 2e29b86cb3b4d9f429e1ef36a61bc6129290c38c

  • Daniel Palmieri <daniel.palmieri.woop@eduzz.com>

laravelEduzzaccounts-laravel-adapter


README

Módulo para utilizar o Eduzz Account com uma aplicação Laravel que utiliza o Jetstream.

Instalação

Instale o pacote via composer:

composer require eduzz/accounts-laravel-adapter

Você deve publicar as configurações com:

php artisan vendor:publish --tag="adapter-config"

Você deve publicar e executar as migrations com:

php artisan vendor:publish --tag="adapter-migrations"
php artisan migrate

Este é o conteúdo do arquivo de configuração publicado:

return [

 /**
 * Enable/disable the Eduzz Account button.
 */
 'enabled' => env('EDUZZ_ACCOUNTS_ENABLED', true),

 /**
 * Url to get back the results of the login attempt.
 */
 'callbackUrl' => env('EDUZZ_ACCOUNTS_CALLBACK_URL', '/eduzz/callback/'),

 /**
 * Eduzz credentials of this app.
 */
 'id' => env('EDUZZ_ACCOUNTS_ID'),
 'secret' => env('EDUZZ_ACCOUNTS_SECRET'),

 /**
 * Url to redirect the user after the login.
 */
 'redirect_to' => '/login',

 /**
 * The column name to store the Eduzz Account ID.
 */
 'tableColumn' => 'eduzz_account_id',

 /**
 * Define if the app use Teams.
 */
 'hasTeams' => true,

 /**
 * The app logo to show in the login page.
 */
 'logo' => '',

 /**
 * The background image to show in the login page.
 */
 'backgroundImage' => '',

 /**
 * Define the button color.
 */
 'buttonColor' => '#000',

 /**
 * Set the Eduzz Account Controller class.
 */
 'routeController' => \Eduzz\AccountsLaravelAdapter\AccountsLaravelAdapterController::class,

 /**
 * The Eduzz Account url API.
 */
 'productionApiUrl' => env('EDUZZ_ACCOUNT_API_URL'),
 'testingApiUrl' => env('EDUZZ_ACCOUNT_TESTING_API_URL'),
];

Também importe os estilos css do botão em app.css:

@import "/vendor/eduzz/accounts-laravel-adapter/resources/dist/button.css";

Opcionalmente, você pode publicar as view com:

php artisan vendor:publish --tag="adapter-views"

Uso

Na sua view do blade, use:

<x-eduzz-account-login-button>Login com Eduzz Account</x-eduzz-account-login-button>

👁 Captura de Tela de Login

Testando

composer test

Licença

MIT License (MIT).