Download the PHP package renepardon/lighthouse-graphql-passport-auth without Composer

On this page you can find all versions of the php package renepardon/lighthouse-graphql-passport-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lighthouse-graphql-passport-auth

Lighthouse GraphQL Passport Auth (Laravel ^6.2 / Lighthouse ^4.8)

GraphQL mutations for Laravel Passport using Lighthouse version ^4.8

Installation

Make sure you have Laravel Passport installed.

To install run composer require renepardon/lighthouse-graphql-passport-auth.

ServiceProvider will be attached automatically

Run this command to publish the migration, schema and configuration file

Add the following env vars to your .env

You are done with the installation!

Configuration

In the configuration file you can now set the schema file to be used for the exported one like this:

This will allow you to change the schema and resolvers if needed.

Usage

This will add 8 mutations to your GraphQL API

Using the email verification

If you want to use the email verification feature that comes with laravel, please follow the instruction in the laravel documentation to configure the model in https://laravel.com/docs/6.x/verification, once that is done add the following traits

This will add some methods for the email notification to be sent with a token. Use the token in the following mutation.

If the token is valid the tokens will be issued.

Using socialite for social login

If you want to use the mutation for social login, please add the Renepardon\LighthouseGraphQLPassport\HasSocialLogin trait to your user model like this

This will add a method that is used by the mutation to get the user from the social network and create or get it from the DB based on the provider and provider_id

You can override the method and add more fields if you need to.

Make sure Socialite is configured properly to use the social network, please see Laravel Socialite

Why the OAuth client is used in the backend and not from the client application?

When an application that needs to be re compiled and re deploy to stores like an iOS app needs to change the client for whatever reason, it becomes a blocker for QA or even brakes the production app if the client is removed. The app will not work until the new version with the updated keys is deployed. There are alternatives to store this configuration in the client but for this use case we are relying on the backend to be the OAuth client

Tests

To run the test in this package, navigate to the root folder of the project and run

Then

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email rene dot pardon at boonweb dot de instead of using the issue tracker.

Credits

And all developers within the commit history.

License

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


All versions of lighthouse-graphql-passport-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
nuwave/lighthouse Version ^4.8
laravel/passport Version ^8.2
laravel/socialite Version ^4.3
guzzlehttp/guzzle Version ^6.5
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package renepardon/lighthouse-graphql-passport-auth contains the following files

Loading the files please wait ....