Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Run the following docker-compose.yml and replace the environment variables with your own:

version: "3.9"

services:
  ft_token_manager:
    container_name: ft_token_manager
    hostname: ft_token_manager
    image: pruizca/ft_token_manager:latest
    ports:
      - "3000:3000"
    environment:
      X-SECRET: "secret generated by you that must be sent in the request header"
      INTRA_AUTH_URL: "https://api.intra.42.fr/oauth/token"
      INTRA_CLIENT_UID: ""
      INTRA_CLIENT_SECRET: ""
      INTRA_REDIRECT_URI: ""

Routes

POST /token/access -> exchange the webflow auth code for a token

POST /token/refresh -> exchange a refresh_token for a token

Returns

The same object returned by intra

{
"access_token":"42804d1f2480c240f94d8f24b45b318e4bf42e742f0c06a42c6f4242787af42d",
"token_type":"bearer",
"expires_in":7200,
"scope":"public",
"created_at":1443451918
}

About

FastAPI server that acts as an intermediary to request 42 webAuth tokens. This way your client secret is hidden from the end user and you can update UID and Secrets in one centralized place

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages