runthis/laravel-google-auth 问题修复 & 功能扩展

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

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

runthis/laravel-google-auth

Composer 安装命令:

composer require runthis/laravel-google-auth

包简介

Set up google authentication in laravel

README 文档

README

A tiny laravel package to authenticate users via google with domain verification.

Installation

composer require runthis/laravel-google-auth

Setup

Google

Head over to https://console.cloud.google.com/apis/credentials and set up some oauth credentials. Note the client id.

Laravel

Open up your .env file and add the following keys and adjust as necessary.

GOOGLE_CLIENT_ID="xxx.apps.googleusercontent.com"
GOOGLE_BASE_ROUTE="/login"
GOOGLE_AUTH_ROUTE="/auth/callback"
GOOGLE_VALID_DOMAIN="domain.com"

With the above environment variables; When a user visits /login in your application, they will be presented with a page containing a button to sign in with Google.

Usage

Package emits Runthis\Login\Events\UserWasAuthenticatedWithGoogle when google login is successful and contains an array payload with various keys provided by google (name, email, picture, etc).

Create a listener in Laravel. Add use Runthis\Login\Events\UserWasAuthenticatedWithGoogle;. Set the handle method parameter to UserWasAuthenticatedWithGoogle $event. Handle the event as you want (logging the user in, adding to database if you like, etc).

Changelog

Please see CHANGELOG for more information on what has changed recently.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固