Installation - Ulbora/GoAuth2 GitHub Wiki
Installing GoAuth2
Install Database
The default database for GoAuth2 is MySql.
- Download the go_auth2.sql file here
- Run the go_auth2.sql file on a MySql Server
Docker Installation
If you want to run GoAuth2 on Docker:
https://hub.docker.com/r/ulboralabs/goauth2
docker pull ulboralabs/goauth2
OR
Compile GoAuth2
- Run build.sh if you are on a Linux compile on other systems
- Copy the following to where you want to run GoAuth2
- main file
- static folder
Set Environment Variables
Database Variables
- GOAUTH2_HOST (database host URL)
- when not set, defaults to: localhost:3306
- GOAUTH2_USER (database username)
- when not set, defaults to: admin
- GOAUTH2_PASSWORD (database password)
- when not set, defaults to: admin
- GOAUTH2_DATABASE (database name)
- when not set, defaults to: go_auth2
Authentication Server Variable
- AUTHENTICATION_SERVICE (Authentication server URL: default is GoAuth2Users)
- When not set, defaults to: http://localhost:3001/rs/user/login
Logging Level Access Key
- LOGGING_KEY (key for access to log lever REST service)
- when not set, defaults to: 45sdbb2345
Token Parameters
- ACCESS_TOKEN_KEY (secret key for access token)
- when not set, defaults value in database table
- REFRESH_TOKEN_KEY (secret key for refresh token)
- when not set, defaults value in database table
- TOKEN_ISSUER (token issuer)
- when not set, defaults to: GoAuth2
- TOKEN_AUDIENCE (token audience)
- when not set, defaults to: GoAuth2.com
GoAuth2Users)
Start Authentication Service (- Run the GoAuth2Users Service
- Username = admin
- Password = admin
Run GoAuth2 (not Docker)
- Run ./start.sh to start GoAuth2 on a Linux platform
- On other platforms, copy the content of start.sh and modify it for your platform
OR
Docker Installation
- On Docker, ./start will automatically run