Skip to content

energyaccessexplorer/authenticator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Server with Resource Watch API Integration

This server is written in Go and allows users to sign up and log in via the Resource Watch API. The server uses JWT for authentication and is built with the Gorilla Mux router, handling CORS configurations for cross-origin requests.

Features

  • Sign Up: Creates a new user on the Resource Watch platform.
  • Log In: Authenticates a user and generates a JWT token for session management.

Requirements

Setup

  1. Clone the repository and navigate to the project directory.

  2. Environment Variables: Create a copy of .env.example into a .env file in the project root to store environment variables. It should contain the following keys:

    PORT=":5003"
    APP_NAME=resource_watch_app_name
    PGREST_SECRET=your_jwt_secret_shared_with_postgREST
    CALLBACK_URL=website_url
    RW_API_KEY=resource_watch_API_key
    DATABASE_URI=postgresql://
    
  3. Install Dependencies:

    Run the following commands to install necessary dependencies.

    go get

Running

go run main.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages