Skip to content

Commit

Permalink
added logo and more info on authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
piggydoughnut committed May 29, 2024
1 parent ff55a65 commit f53f117
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 15 deletions.
16 changes: 16 additions & 0 deletions documentation/pages/framework/authentication.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Authentication

Authentication providers are defined in `application.json` under `auth.providers`. The default provider is `polkadot`. You can also turn on `google` auth provider and specify roles according to your domain.

## Polkadot authentication

Users are registered with their polkadot addresses.

Users have to have valid NFTs in their wallet in order to access the physical space and certain parts of the app.

### Wallet Connect

Wallet Connect allows your users to log in using their mobile devices. It is advisable to turn this feature on. In order to activate Wallet Connect integration you have to provide `WALLET_CONNECT_PROJECT_ID` in your `.env` file.

Feel free to modify `AUTH_MESSAGE_TO_SIGN` to be any string you prefer instead of a random default string.

## Google authentication

Users can register using Google SSO. An automatic role can be configured and given based on the email domains users are registering with.
10 changes: 0 additions & 10 deletions documentation/pages/framework/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ Configuration for the project lives in a `./config` directory. We suggest keepin
└── visits
└── notification.yaml
```

### Mapbox

Support for maps.

We use `mapbox` in a few places:

- All users map at `/map`.
- Map of the hub location on the about page `/about/<hubId>`
- User location on their profile if they specify that they want to share. `/profile/<userId>`
20 changes: 16 additions & 4 deletions documentation/pages/framework/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@

## Matrix

## Mapbox
Matrix notifications are supported. In order to send the notifications one has to make sure users are providing matrix handles in their profiles.

## Stripe
See the [List of all notification types](https://github.com/paritytech/polkadot-hub-app/blob/3589ba1e06265d93597d37e01ad74d508bd63816/src/integrations/matrix/README.md#notifications) for more information.

The profile fields can be configured in metadata section of the "users" module in modules.json. See [users module](/modules/users) for more information.

### Mapbox

Support for maps. Activates if `MAPBOX_API_KEY` is set in your `.env` file.

`Mapbox` is used in a few places:

- All users map at `/map`.
- Map of the hub location on the about page `/about/<hubId>`
- User location on their profile if they specify that they want to share. `/profile/<userId>`

### Email-smtp

Add `.env` variables.
Set the following variables in your `.env` file.

```
SMTP_ENDPOINT=""
SMTP_PORT=
SMTP_PORT=""
SMTP_USERNAME=""
Expand Down
72 changes: 72 additions & 0 deletions documentation/pages/modules/users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Users module

### Configuring profile fields

Contact fields are displayed when users are onboarding. Users can modify contact fields in their profile after the onboarding as well.

You can configure which contact fields are required for your instance by setting `required` to true or false.

You can change the displayed field names for them by modifying `fieldName` values.

If you do not want to use a certain field, you can remove its configuration entirely and it wont be shown.

e.g

```json
"metadata": {
"profileFields": {
"birthday": {
"label": "Birthday",
"required": false
},
"team": {
"label": "Team",
"placeholder": "Team name",
"required": false
},
"jobTitle": {
"label": "What do you do?",
"placeholder": "Rust Engineer",
"required": false
},
"bio": {
"label": "Notes about you",
"placeholder": "Leave here any notes that may be helpful to others: how to work with you, scope of responsibility, extra contact information, or literally anything you want to share with people visiting your profile.",
"required": false
},
"contacts": {
"matrix": {
"label": "Matrix Handle",
"placeholder": "@username:example.com",
"required": true,
"prefix": "https://matrix.to/#/@"
},
"github": {
"label": "GitHub",
"placeholder": "username",
"required": false,
"prefix": "https://github.com/"
},
"telegram": {
"label": "Telegram",
"placeholder": "username",
"required": false,
"prefix": "https://t.me/"
},
"signal": {
"label": "Signal",
"placeholder": "username",
"required": false,
"prefix": "https://signal.me/#p/"
},
"twitter": {
"label": "Twitter",
"placeholder": "username",
"required": false,
"prefix": "https://twitter.com/"
}
}
}
}

```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion documentation/theme.config.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
logo: <span>Polkadot Hub App Documentation</span>,
logo: <img width={120} src="/Polkadot-Hubs-Logotype-BL.png"></img>,
darkMode: true,
docsRepositoryBase: 'https://github.com/paritytech/polkadot-hub-app',
project: {
link: 'https://github.com/paritytech/polkadot-hub-app'
},
Expand Down

0 comments on commit f53f117

Please sign in to comment.