Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Configuration

David edited this page Feb 10, 2022 · 2 revisions

In this section we are going to provide the needed configuration in case the developer wants to enable a specific feature.

User accounts

By default the project provides a platform that delivers different courses. Static content that doesn't need too much configuration if you follow the Getting started section of the README. Additionally the project provides a way to manage user accounts using different providers, IBMID and Google. Enabling actions like create an account or do a login. To use these providers locally while you develop you will need to configure them so let's try explain step by step how you can setup them.

IBMID

This provider is pretty easy. How it can't handle localhost redirections you can't use it locally so this provider it will be only available for production and staging (our preview environment).

Google

To configure this provider locally you can follow the next steps in order:

  1. Using your google account go to Google cloud's console
  2. Click in the menu bar and navigate to APIs & Services.
  3. In the left of this section you will find two interesting options: Credentials and OAuth consent screen.
  4. Before create your credentials for the provider you need to configure first your OAuth consent screen in case you don't have one. It's relatively simple, just follow the steps and fill the inputs with whatever placeholder like Test, for example. IMPORTANT: how this is going to be only for testing purpose in one of the steps it will ask you for a list of test users. Just add there the gmail account that you will use for your tests and that's all.
  5. Once time the consent screen is configured just click in Credentials in the left menu.
  6. At the top of the page click in CREATE CREDENTIALS -> OAuth client ID
  7. It will open you a form that you should fill with the next values: 7.1 Application type: Web application 7.2 Name: whatever you want 7.3 Authorized JavaScript origins: http://localhost:8080 (default configuration for the server) 7.4 Authorized redirect URIs: http://localhost:8080/auth/google/callback (default configuration in platypus for the redirection)
  8. Click on Create
  9. It will prompt you the values for the ClientID and Secret, copy them if you want but don't worry if you loose that information. If you enter again in the ID it will show you that info.
  10. Now you have the provider's info. To configure platypus with it just go to the root of the project and at the bottom of the config.yaml you can fill the variables google.clientId and google.clientSecret. IMPORTANT: remember not upload this change.
Clone this wiki locally