ibrah3m/loginwithmetamsk

this package build to insert login with metamask option just by adding 1 line in your blade :)

dev-main 2022-04-07 15:47 UTC

This package is auto-updated.

Last update: 2024-05-13 21:19:01 UTC


README

Open in Gitpod Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

LOGIN-WITH-METAMASK

An awesome laravel package made for adding login with MetaMask wallet option in your projects!

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

There are many great LOGIN packages available on GitHub. However, I didn't find one that really suited my needs in LARAVEL, so I created this enhanced one. I want to create a package for login with MetaMask so unique that it'll be the last one you ever need - I think this is it.

Here's why:

  • Your time should be focused on creating something amazing. A project that solves a problem and helps others
  • You shouldn't be doing the same tasks over and over like creating a Login page from scratch
  • You should implement DRY principles to the rest of your life 😄

Of course, no one package will serve all projects since your needs may be different but what makes this package unique is the simplicity of the installation by adding just the script link to your blade as explaind below . So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed to expanding this package!

Read the rest to get started

(back to top)

Built With

Frameworks/libraries used to bootstrap your package.

(back to top)

Getting Started

In the few come lines, we will give you instructions about how to set up this repo inside your project so let's follow and enjoy this installation trip.

Prerequisites

First in order to install this package inside your laravel project , so to do that we prefere using composer as explained below .

  • composer
    composer require ibrah3m/loginwithmetamsk

Installation

_Below is an explanation of how you should install and set up the package inside your app.

  1. add the package provider
     At config/app.php put this line inside providers array 
     Ibrah3m\LoginWithMetamsk\MetamaskServiceProvider::class,
  2. run the following in the command line
    php artisan vendor:publish
    you will see a list of options select the below or 0 for all
    Tag: public

(back to top)

Usage

Here we go almost finsih , now you can use the package in different ways let's see each of them .

  1. by route
  just visit the link below 
  http://www.example.com/CustomLoginPage
  1. by javascript plugin
  inside your <HEAD> tag at  login blade just put the following links to make the template render automatically 
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
  <script type="text/javascript" src="{{route('metamask.plugin')}}">
  1. adding just the login button instead of the whole template
  *find the package at vendor folder called  "ibrah3m"
  *inside the views folder go to file 
  "FrontJsHook.blade.php" comment line 12  "$("body").append(`@include('loginwithmetamsk::MetaMaskLoginTemplate')`);"
  *now inside your login blade add login button by this line  
  <button class="btn btn-primary btn-block text-white btn-user" onClick="metamasklogin()" style="background: rgb(246,133,27);">MetaMask</button>
  *In the end your blade will contain all of the  below
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
  <script type="text/javascript" src="{{route('metamask.plugin')}}">
  <button class="btn btn-primary btn-block text-white btn-user" onClick="metamasklogin()" style="background: rgb(246,133,27);">MetaMask</button>

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Change Template Design

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Ibrahem Aljabr - @website

Project Link: https://github.com/ibrah3m/LoginWithMetamask

(back to top)

Acknowledgments

(back to top)