Socket
Socket
Sign inDemoInstall

@swyger/client-auth

Package Overview
Dependencies
36
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @swyger/client-auth

Swyger Auth Client JS library is used for Swyger Server as consumer Rest API focused on authentication (register, login, forgot password...). Visit the master branch: https://github.com/coorise/swyger-js-client-auth.git


Version published
Weekly downloads
11
increased by266.67%
Maintainers
1
Install size
15.3 MB
Created
Weekly downloads
 

Readme

Source

Swyger Auth Client JS

Get Started

Swyger Auth Client JS library is used for Swyger Server as consumer Rest API for authentication(login,register,refresh token,...) . Visit the master branch: https://github.com/coorise/swyger-js-client-auth.git

You can download the swyger auth client js library on: https://www.unpkg.com/@swyger/client-auth

then save it somewhere in your directory like "/dist/swyger-client-auth.min.js"

<script type="module">
        import SwygerAuthClient from './dist/swyger-client-auth.min.js'
        //import SwygerAuthClient from '@swyger/client-auth' //with npm for node module
        let config={
            //Configure the offline DB
            OFFLINE_DB_NAME:{
                AUTH:'swyger_auth'
            },

            //Configure the server
            HOST_SERVER:{
                AUTH:'http://localhost:4100',
                
            },
            API_VERSION:{
                AUTH:'/api/v1',
            },
            AUTO_REFRESH_TOKEN_TIMEOUT:1500000, //in millisecond= 25 minutes
            // A Unique Api key for all your servers
            API_KEY:your_api_key
        }
        let client =SwygerAuthClient.init(config)
        //now you can do authentication
        let auth= client.auth
        auth.register({email,password},callback)
        auth.login({email,password},callback)
        ...

 </script>

Build Your Own JS Client Library

Note 0: Clone the repository:

git clone https://github.com/coorise/swyger-js-client-auth.git

Note 1: For more details about how to use our API Consumer, visit the DOC : https://github.com/coorise/swyger-js-client-auth/tree/master/doc/swyger/api.

Note 2: If you want to modify the entire api (eg:children route,...), you have to work with the main project (installing Node JS with the project dependencies npm i)
then locate the ./src/api/api-route.js,
once you are done just build it with npm run build,
to get your new library in dist folder.

Todo

  • Removing/Reduce some unusual dependencies,functions, refactoring paths/files...
  • Making good and easy documentation with tutorials (videos, webpage...)
  • Code Cleaning/ Making a suitable project structure with modulable pattern

Join US

If you have any suggestion, feature to add ...etc

Contributors

  • Agglomy Team :
    • Ivan Joel Sobgui

Licence

MIT: You can use it for educational/personal/business purpose!

Keywords

FAQs

Last updated on 09 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc