-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment
Fysikmotorn edited this page Dec 26, 2024
·
3 revisions
In order to send mail, a token must be generated by the following steps.
- Acquire the file
gmail_secret.json
by either method:- Go to Google Drive
$\to$ F.dev: Bittan - Känsligt$\to$ Mail$\to$ gmail_secret.json
and download this file. If this file is not available or is not working, a new one should be made and uploaded here. - Go to Google Cloud console. Login according to the details in Google Drive
$\to$ F.dev: Bittan - Känsligt$\to$ Mail$\to$ biljettmail-uppgifter.txt
. Open the projectbittan
. Go to APIs and Services$\to$ Credentials. Download a Client Secret and rename the file togmail_secret.json
.
- Go to Google Drive
- This step probably needs to be done in a local copy of the bittan repo. Place
gmail_secret.json
in/backend/bittan/
. Navigate to/backend/bittan/scripts/
and runmanual_create_token.py
. This generates a filegmail_token.json
in/backend/bittan/
. - Upload the file
gmail_token.json
to the production container at/backend/bittan/gmail_token.json
.
You have to (using your webserver of choice, e.g nginx) check the client certificates of all requests going to <base_url>/swish/callback
.
Unverified requests must not reach this endpoint since requests that reach the django application are assumed to be verified and are not checked in the django app.