muerwre.github.io/frontend/react-native/oauth2-login/_payload.js
muerwre 468abb8bc0 commit e92e0685ed8d7a331fd961e21085ec5b445cf3aa
Author: Fedor Katurov <gotham48@gmail.com>
Date:   Thu Nov 3 18:52:26 2022 +0600

    added empty projects page
2022-11-03 12:54:16 +00:00

1 line
No EOL
18 KiB
JavaScript

export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:U,_path:V},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-zuvbG5OO4q":{_path:V,_dir:"react-native",_draft:A,_partial:A,_locale:"en",_empty:A,title:U,description:B,excerpt:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:H}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:K}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]}]},body:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" { "}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" } "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'react-native-app-auth'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F ..."}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" issuer: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'https:\u002F\u002Faccounts.google.com'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}.apps.googleusercontent.com`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`com.yourapp:\u002Foauth2redirect\u002Fgoogle`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'openid'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'profile'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"; "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F better hide it somehow"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'com.yourapp'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" serviceConfiguration: {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" authorizationEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&redirect_uri=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F TODO: replace it with your own backend to secure client_secret:"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" tokenEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&client_secret=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" },"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:info'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:avatar'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:S},children:[{type:b,value:"callback"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"("}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"accessToken"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:");"}]}]}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:"style",children:[{type:b,value:".ct-68f8f5{color:#79C0FF}.ct-035d5a{color:#D2A8FF}.ct-94fecd{color:#8B949E}.ct-c0142e{color:#79C0FF}.ct-9cdce7{color:#FF7B72}.ct-259179{color:#A5D6FF}.ct-09167a{color:#C9D1D9}.ct-c906eb{color:#C9D1D9}.ct-d6abe0{color:#FF7B72}.light .ct-d6abe0{color:#859900}.light .ct-c906eb{color:#657B83}.light .ct-09167a{color:#268BD2}.light .ct-259179{color:#2AA198}.light .ct-9cdce7{color:#073642}.light .ct-c0142e{color:#268BD2}.light .ct-94fecd{color:#93A1A1}.light .ct-035d5a{color:#268BD2}.light .ct-68f8f5{color:#B58900}"}]}],toc:{title:q,searchDepth:z,depth:z,links:[{id:C,depth:z,text:D,children:[{id:F,depth:au,text:G},{id:I,depth:au,text:J}]},{id:L,depth:z,text:M}]}},_type:"markdown",_id:"content:Frontend:React Native:OAuth2 login.md",_source:"content",_file:"Frontend\u002FReact Native\u002FOAuth2 login.md",_extension:"md"}},prerenderedAt:1667480032646}}("element","text","span","ct-c906eb","line"," ","ct-259179","ct-c0142e","ct-d6abe0",",","code","p","a","ct-9cdce7","const","=","","h2","react-native-app-auth","h3","typescript","pre","nofollow",";","YANDEX_OAUTH_CLIENT",2,false,"Use #oauth2 login with React-Native","common-oauth2-providers","Common OAuth2 providers",".","example-for-google","Example for #Google","import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n\u002F\u002F ...\nconst authState = await authorize({\n issuer: 'https:\u002F\u002Faccounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:\u002Foauth2redirect\u002Fgoogle`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","example-for-yandex","Example for #Yandex","const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; \u002F\u002F better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:\u002Foauth2redirect`,\n \u002F\u002F TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:\u002Foauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","apple-id-login","Apple ID login","ct-09167a","authorize","'...'","ct-94fecd","authState","ct-035d5a","APP_ID","OAuth2 Login","\u002Ffrontend\u002Freact-native\u002Foauth2-login","root","Can be handled by "," by redirecting to url ","code-inline","com.yourapp:\u002F\u002Foauth2provider","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication","react-native-apple-authentication"," has its own ","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication\u002Ftree\u002Fmain\u002Fdocs","documentation"," on setting up OAuth using Apple ID.","GOOGLE_OAUTH_CLIENT","await","({"," clientId: ","`${"," redirectUrl: "," scopes: [",", ","],"," dangerouslyAllowInsecureHttpRequests: ","ct-68f8f5","true","});","YANDEX_OAUTH_SECRET","}:\u002Foauth2redirect`",3))