/hono-proxy-backend

This repository provides endpoints to interact with an external API for authentication purposes

Primary LanguageTypeScript

hono-proxy-backend

Table of Contents

Project Description

This repository provides endpoints to interact with an external API for authentication purposes. It includes the following functionalities:

  • Login: Authenticates users and retrieves access tokens.
  • Logout: Logs users out and invalidates their sessions.
  • AutoLogin: Automatically logs users in based on stored credentials.
  • Token Info: Retrieves information about a given JWT token.

Technologies Used

  • Hono
  • Node.js
  • TypeScript
  • AWS Lambda

Setup

  1. Clone the repository:

    git clone https://github.com/codehass/hono-proxy-backend.git
    
    cd hono-proxy-backend.
  2. Install dependencies:

    npm install

Running the Project Locally

  1. Start the development server:

    npm run dev
  2. The backend should now be running on http://localhost:3000 (or the port specified in the console).

API Endpoints

  • GET /login - User login
  • POST /autoLogin - User autoLogin
  • POST /logout - User logout
  • POST /token_info - User token info

Results

  • login Screenshot of Backend
  • autoLogin Screenshot of Backend
  • logout Screenshot of Backend
  • token_info Screenshot of Backend

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.