Skip to content

Commit cd57f65

Browse files
authored
Merge pull request #19 from arthurpar06/addIVAODocs
Add IVAO OAuth Docs
2 parents 762dedb + 1c042fe commit cd57f65

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

docs/oauth/img/create-ivao.png

25.9 KB
Loading

docs/oauth/ivao.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: ivao
3+
title: IVAO
4+
sidebar_title: IVAO
5+
---
6+
7+
Go to the [Create OAuth Application](https://developers.ivao.aero/create) page and create a new app, he application type must be "Virtual Airline App". To choose this type, you need to be logged in with the account of the owner of the virtual airline on IVAO.
8+
In the redirect URL, enter: `https://yourdomain.com/oauth/ivao/callback`
9+
10+
![](img/create-ivao.png)
11+
12+
In the `.env` file, add the following:
13+
14+
```shell title=".env"
15+
IVAO_OAUTH_ENABLED=true
16+
IVAO_CLIENT_ID={your_client_id}
17+
IVAO_CLIENT_SECRET={your_client_secret}
18+
```
19+
You can retrieve your client ID and your client secret from the OAuth clients page after creating the client as explained above.
20+
21+
Now, your users can link their IVAO account to their phpVMS account and use their IVAO account to log in. The link between the two accounts is automatically established when clicking the "Login with IVAO" button on the login page. However, if the email address of the IVAO account is different from the email address of the phpVMS account, it must be done manually on the profile page.
22+
23+
24+
## Customizing scopes
25+
26+
You can add scopes to the OAuth request in addition to the default scopes by adding your scopes to the `.env` file, separated by commas.
27+
See [IVAO Scopes List](https://wiki.ivao.aero/en/home/devops/api/oauth-scopes)
28+
29+
```shell title=".env"
30+
IVAO_SCOPES=scope1,scope2
31+
```

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = {
4141
label: 'OAuth',
4242
items: [
4343
'oauth/discord',
44+
'oauth/ivao',
4445
'oauth/vatsim',
4546
]
4647
},

0 commit comments

Comments
 (0)