1 line
5.9 KiB
JavaScript
1 line
5.9 KiB
JavaScript
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([["2464"],{6743:function(e,s,i){i.r(s),i.d(s,{default:()=>l,frontMatter:()=>o,metadata:()=>t,assets:()=>c,toc:()=>u,contentTitle:()=>a});var t=JSON.parse('{"id":"features/github-integration","title":"GitHub Integration","description":"Generally, LiveCodes can be used anonymously without any accounts. This includes importing code from GitHub gists or public repos.","source":"@site/docs/features/github-integration.mdx","sourceDirName":"features","slug":"/features/github-integration","permalink":"/docs/features/github-integration","draft":false,"unlisted":false,"editUrl":"https://github.com/live-codes/livecodes/tree/develop/docs/docs/features/github-integration.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"docsSidebar","previous":{"title":"Backup / Restore","permalink":"/docs/features/backup-restore"},"next":{"title":"Integrations","permalink":"/docs/features/integrations"}}'),r=i("5893"),n=i("65");let o={},a="GitHub Integration",c={},u=[{value:"Features that require GitHub Account",id:"features-that-require-github-account",level:2},{value:"Public Repos",id:"public-repos",level:3},{value:"Private Repos",id:"private-repos",level:3},{value:"Gists",id:"gists",level:3},{value:"Setting Permissions",id:"setting-permissions",level:2}];function d(e){let s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"github-integration",children:"GitHub Integration"})}),"\n",(0,r.jsxs)(s.p,{children:["Generally, LiveCodes can be used anonymously without any accounts. This includes ",(0,r.jsx)(s.a,{href:"/docs/features/import",children:"importing"})," code from GitHub gists or public repos."]}),"\n",(0,r.jsxs)(s.p,{children:["However, some features do require ",(0,r.jsx)(s.a,{href:"/docs/features/user-management",children:"login"})," with a GitHub account and giving ",(0,r.jsx)(s.a,{href:"https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes",children:"specific permissions"})," to make use of GitHub services (e.g. ",(0,r.jsx)(s.a,{href:"/docs/features/import",children:"import"})," from private repos, ",(0,r.jsx)(s.a,{href:"/docs/features/export",children:"export"})," to gist, ",(0,r.jsx)(s.a,{href:"/docs/features/deploy",children:"deploy"}),", ",(0,r.jsx)(s.a,{href:"/docs/features/assets",children:"assets"})," and ",(0,r.jsx)(s.a,{href:"/docs/features/sync",children:"sync"}),")."]}),"\n",(0,r.jsx)(s.admonition,{title:"cookies",type:"caution",children:(0,r.jsxs)(s.p,{children:["User authentication is handled using ",(0,r.jsx)(s.a,{href:"https://firebase.google.com/products/auth",children:"Firebase Authentication"})," which ",(0,r.jsx)(s.strong,{children:"may use cookies"}),". By logging in, you agree that cookies may be stored on your device."]})}),"\n",(0,r.jsx)(s.h2,{id:"features-that-require-github-account",children:"Features that require GitHub Account"}),"\n",(0,r.jsx)(s.h3,{id:"public-repos",children:"Public Repos"}),"\n",(0,r.jsx)(s.p,{children:"Access to public repos is required for:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/deploy",children:"Deploy"}),": A new public repo is created (if required) and code is pushed to the branch ",(0,r.jsx)(s.code,{children:"gh-pages"})," of the repo. The is deployed on ",(0,r.jsx)(s.a,{href:"https://pages.github.com/",children:"GitHub pages"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/assets",children:"Assets"}),": can be stored on a public repo published on ",(0,r.jsx)(s.a,{href:"https://pages.github.com/",children:"GitHub pages"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"private-repos",children:"Private Repos"}),"\n",(0,r.jsx)(s.p,{children:"Access to private repos is required to:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/import",children:"Import"})," code from private repos."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/sync",children:"Sync"})," LiveCodes data to a private repo."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"gists",children:"Gists"}),"\n",(0,r.jsx)(s.p,{children:"Access to gists is required to:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/export",children:"Export"})," projects to GitHub gist."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"setting-permissions",children:"Setting Permissions"}),"\n",(0,r.jsx)(s.p,{children:"GitHub user permissions for LiveCodes app are set the first time the user logs in. Any subsequent login will use the first permissions, even if they are set differently."}),"\n",(0,r.jsx)(s.p,{children:"To change previously set permissions:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/user-management",children:"Logout"})," from the LiveCodes app."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/reviewing-your-authorized-oauth-applications",children:"Revoke permissions"})," of LiveCodes app in your GitHub account."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/docs/features/user-management",children:"Login"})," again in LiveCodes and set the new permissions."]}),"\n"]})]})}function l(e={}){let{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},65:function(e,s,i){i.d(s,{Z:function(){return a},a:function(){return o}});var t=i(7294);let r={},n=t.createContext(r);function o(e){let s=t.useContext(n);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(n.Provider,{value:s},e.children)}}}]); |