-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move OAuth Setup to a manual process (#98)
* Move OAuth Setup to a manual process Moving the manual setup to a manual process, and setup initial callback URL using sslip.io. In the process also included: * Improved error logging for failure to login. * Updated README.md instructions. * Set fixed size on launcher window, also center on screen (mainly because I use a tiling window manager) * Use a static IP for the frontend service so we can template out config variables. Work on #86 * Fix single quoted syntax error. --------- Co-authored-by: Ben Huston <[email protected]>
- Loading branch information
1 parent
d208a89
commit d5ceaa8
Showing
14 changed files
with
130 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
## Generic game launcher with "Sign-in with google" authentication. | ||
|
||
For prerequisites check here: | ||
https://developer.fyne.io/started/ | ||
To run the launcher locally: | ||
|
||
For packaging check here: | ||
https://developer.fyne.io/started/packaging | ||
```shell | ||
go run main.go | ||
``` | ||
|
||
To build locally after installing necessary dependencies just run: | ||
|
||
`go build .` | ||
```shell | ||
go build . | ||
``` | ||
|
||
Move the built binary together with `app.ini` and `assets/` to the game client folder. Launch there. | ||
|
||
`app.ini` contains the configuration endpoint for the Frontend API as well as executable names for the game client. | ||
|
||
If you want to fully package the launcher: | ||
|
||
For prerequisites check here: | ||
https://developer.fyne.io/started/ | ||
|
||
For packaging check here: | ||
https://developer.fyne.io/started/packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,29 +118,28 @@ resource "local_file" "services-ping-service-account" { | |
} | ||
|
||
# | ||
# OAuth Credentials for the Frontend Service | ||
# Frontend Service | ||
# | ||
|
||
resource "google_iap_brand" "project_brand" { | ||
support_email = "[email protected]" | ||
application_title = "Global Game Demo" | ||
project = var.project | ||
resource "google_compute_address" "frontend-service" { | ||
project = var.project | ||
provider = google-beta # so we can do labels | ||
|
||
depends_on = [google_project_service.project] | ||
} | ||
region = var.services_gke_config.location | ||
name = "frontend-service" | ||
|
||
resource "google_iap_client" "project_client" { | ||
display_name = "Global Game Client" | ||
brand = google_iap_brand.project_brand.name | ||
labels = { | ||
"environment" = var.resource_env_label | ||
} | ||
} | ||
|
||
# Make the environment configmap for the front service | ||
resource "local_file" "services-frontend-config-map" { | ||
content = templatefile( | ||
"${path.module}/files/services/frontend-configmap.yaml.tpl", { | ||
client_id = google_iap_client.project_client.client_id | ||
client_secret = google_iap_client.project_client.secret | ||
jwt_key = var.frontend-service.jwt_key | ||
"${path.module}/files/services/frontend-config.yaml.tpl", { | ||
service_address = google_compute_address.frontend-service.address | ||
client_id = var.frontend-service.client_id | ||
client_secret = var.frontend-service.client_secret | ||
jwt_key = var.frontend-service.jwt_key | ||
}) | ||
filename = "${path.module}/${var.services_directory}/frontend/configmap.yaml" | ||
filename = "${path.module}/${var.services_directory}/frontend/config.yaml" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters