1"use strict";(self.webpackChunkphpvms_docs=self.webpackChunkphpvms_docs||[]).push([[6529],{84910(e,t,n){n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"oauth/ivao","title":"IVAO","description":"Go to the Create OAuth Application page","source":"@site/versioned_docs/version-v7.x/oauth/ivao.md","sourceDirName":"oauth","slug":"/oauth/ivao","permalink":"/oauth/ivao","draft":false,"unlisted":false,"editUrl":"https://github.com/phpvms/docs/tree/master/versioned_docs/version-v7.x/oauth/ivao.md","tags":[],"version":"v7.x","frontMatter":{"id":"ivao","title":"IVAO","sidebar_title":"IVAO"},"sidebar":"docs","previous":{"title":"Discord","permalink":"/oauth/discord"},"next":{"title":"VATSIM","permalink":"/oauth/vatsim"}}');var i=n(74848),s=n(28453);const a={id:"ivao",title:"IVAO",sidebar_title:"IVAO"},c=void 0,r={},d=[{value:"Customizing scopes",id:"customizing-scopes",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["Go to the ",(0,i.jsx)(t.a,{href:"https://developers.ivao.aero/create",children:"Create OAuth Application"}),' page\nand create a new app, he application type must be "Virtual Airline App". To\nchoose this type, you need to be logged in with the account of the owner of the\nvirtual airline on IVAO. In the redirect URL, enter:\n',(0,i.jsx)(t.code,{children:"https://yourdomain.com/oauth/ivao/callback"})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{src:n(2285).A+"",width:"618",height:"435"})}),"\n",(0,i.jsxs)(t.p,{children:["In the ",(0,i.jsx)(t.code,{children:".env"})," file, add the following:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-shell",metastring:'title=".env"',children:"IVAO_OAUTH_ENABLED=true\nIVAO_CLIENT_ID={your_client_id}\nIVAO_CLIENT_SECRET={your_client_secret}\n"})}),"\n",(0,i.jsx)(t.p,{children:"You can retrieve your client ID and your client secret from the OAuth clients\npage after creating the client as explained above."}),"\n",(0,i.jsx)(t.p,{children:'Now, your users can link their IVAO account to their phpvms account and use\ntheir IVAO account to log in. The link between the two accounts is automatically\nestablished when clicking the "Login with IVAO" button on the login page.\nHowever, if the email address of the IVAO account is different from the email\naddress of the phpvms account, it must be done manually on the profile page.'}),"\n",(0,i.jsx)(t.h2,{id:"customizing-scopes",children:"Customizing scopes"}),"\n",(0,i.jsxs)(t.p,{children:["You can add scopes to the OAuth request in addition to the default scopes by\nadding your scopes to the ",(0,i.jsx)(t.code,{children:".env"})," file, separated by commas. See\n",(0,i.jsx)(t.a,{href:"https://wiki.ivao.aero/en/home/devops/api/oauth-scopes",children:"IVAO Scopes List"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-shell",metastring:'title=".env"',children:"IVAO_SCOPES=scope1,scope2\n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},2285(e,t,n){n.d(t,{A:()=>o});const o=n.p+"assets/images/create-ivao-d0e01d67e4a275efdf1405552169ae2e.png"},28453(e,t,n){n.d(t,{R:()=>a,x:()=>c});var o=n(96540);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.