{"id":4130,"date":"2025-07-07T16:34:03","date_gmt":"2025-07-07T13:34:03","guid":{"rendered":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/oauth-2-0\/"},"modified":"2025-07-07T16:46:57","modified_gmt":"2025-07-07T13:46:57","slug":"oauth-2-0","status":"publish","type":"docs","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/oauth-2-0\/","title":{"rendered":"OAuth 2.0"},"content":{"rendered":"\n<p><strong><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/oauth\/\" data-internallinksmanager029f6b8e52c=\"312\" title=\"OAuth (\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438)\">OAuth<\/a> 2.0<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0451\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, OAuth \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <strong>access token<\/strong> \u2014 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n\n\n\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f, \u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u044b\u0434\u0430\u0451\u0442 \u0442\u043e\u043a\u0435\u043d \u2014 <strong>\u0431\u0435\u0437 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>. \u042d\u0442\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0440\u0438\u0441\u043a\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 OAuth 2.0 (\u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0432\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Google).<\/li>\n\n\n\n<li>OAuth-\u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f.<\/li>\n\n\n\n<li>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 <strong>authorization code<\/strong>.<\/li>\n\n\n\n<li>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 <strong>access token<\/strong>.<\/li>\n\n\n\n<li>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u043a\u0435\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/api\/\" data-internallinksmanager029f6b8e52c=\"226\" title=\"API (Application Programming Interface)\">API<\/a> \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/token-based-authentication\/\" data-internallinksmanager029f6b8e52c=\"311\" title=\"Token-based Authentication\">\u0422\u043e\u043a\u0435\u043d\u044b<\/a> \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043e\u0437\u0432\u0430\u043d\u044b, \u0430 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <strong>refresh token<\/strong> \u0431\u0435\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 OAuth 2.0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 Google, Facebook, GitHub \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b;<\/li>\n\n\n\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043a API \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Google Calendar \u0438\u043b\u0438 Dropbox;<\/li>\n\n\n\n<li>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 SPA-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043d\u044b \u0438 \u043f\u0430\u0440\u043e\u043b\u0438;<\/li>\n\n\n\n<li>\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0433\u0434\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c;<\/li>\n\n\n\n<li>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/saas\/\" data-internallinksmanager029f6b8e52c=\"264\" title=\"SaaS\u00a0(Software as a Service)\">SaaS<\/a>-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u044f\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 OAuth 2.0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u0435\u0437 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439;<\/li>\n\n\n\n<li><strong>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c<\/strong>: \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (scope);<\/li>\n\n\n\n<li><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c<\/strong>: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442;<\/li>\n\n\n\n<li><strong>\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/strong>: \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u0438 API.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0436\u0438\u0437\u043d\u0438<\/h3>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 Trello, Notion \u0438\u043b\u0438 Slack \u0447\u0435\u0440\u0435\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Google \u2014 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <strong>OAuth 2.0<\/strong>. Google \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u0430 \u043b\u0438\u0448\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0432\u0430\u0448\u0443 \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u0432\u044b\u0434\u0430\u0451\u0442 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>OAuth 2.0 \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 API-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f\u0445. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0440\u0438\u0441\u043a\u0430.<\/p>\n\n\n\n<p>\u041d\u0438\u0436\u0435 \u2014 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0447\u0430\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OAuth 2.0 \u0432 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/kubernetes\/\" data-internallinksmanager029f6b8e52c=\"259\" title=\"Kubernetes (K8s)\">Kubernetes<\/a> \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/kubernetes-ingress\/\" data-internallinksmanager029f6b8e52c=\"363\" title=\"Kubernetes Ingress (\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 Kubernetes)\">Ingress<\/a>, \u0432 Dev-\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u0438\u043b\u0438 GitHub OAuth-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>OAuth 2.0 \u0447\u0435\u0440\u0435\u0437 Ingress Controller \u0432 Kubernetes (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, oauth2-proxy + NGINX)<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Helm-\u0447\u0430\u0440\u0442: <div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>oauth2-proxy<\/code><\/div> (\u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Google)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code># values.yaml\nconfig:\n  clientID: \"&lt;GOOGLE_CLIENT_ID&gt;\"\n  clientSecret: \"&lt;GOOGLE_CLIENT_SECRET&gt;\"\n  cookieSecret: \"&lt;RANDOM_32BYTE_BASE64&gt;\"\n  provider: google\n  emailDomains:\n    - \"*\"\n  upstreams:\n    - \"file:\/\/\/dev\/null\"\n  redirectURL: \"https:\/\/app.example.com\/oauth2\/callback\"\n\nextraArgs:\n  whitelist-domain: \".example.com\"\n<\/code><\/div><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Ingress \u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>apiVersion: networking.k8s.io\/v1\nkind: Ingress\nmetadata:\n  name: app-ingress\n  annotations:\n    nginx.ingress.kubernetes.io\/auth-url: \"https:\/\/oauth2-proxy.example.com\/oauth2\/auth\"\n    nginx.ingress.kubernetes.io\/auth-signin: \"https:\/\/oauth2-proxy.example.com\/oauth2\/start?rd=$request_uri\"\nspec:\n  rules:\n    - host: app.example.com\n      http:\n        paths:\n          - path: \/\n            pathType: Prefix\n            backend:\n              service:\n                name: app-service\n                port:\n                  number: 80\n<\/code><\/div><\/pre>\n\n\n\n<p>\ud83d\udccc \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0451\u0442 OAuth-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. GitHub OAuth App: \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h3>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/settings\/developers\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/settings\/developers<\/a> \u2192 <strong>New OAuth App<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Application name<\/strong>: MyApp GitHub Login<\/li>\n\n\n\n<li><strong>Homepage URL<\/strong>: <div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>https:\/\/myapp.example.com<\/code><\/div><\/li>\n\n\n\n<li><strong>Authorization callback URL<\/strong>: <div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>https:\/\/myapp.example.com\/oauth\/callback<\/code><\/div><\/li>\n<\/ul>\n\n\n\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c <div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>Client ID<\/code><\/div> \u0438 <div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>Client Secret<\/code><\/div>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 OAuth middleware \u0438\u043b\u0438 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/proxy-server\/\" data-internallinksmanager029f6b8e52c=\"210\" title=\"Proxy Server (\u041f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440)\">\u043f\u0440\u043e\u043a\u0441\u0438<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. CI\/CD: \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 OAuth \u0432 GitHub Actions<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><div class=\"code-block\"><button class=\"copy-btn\">\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button><code>jobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions\/checkout@v3\n\n      - name: Exchange OAuth code for access token\n        run: |\n          TOKEN=$(curl -X POST \\\n            -d \"client_id=${{ secrets.GH_CLIENT_ID }}\" \\\n            -d \"client_secret=${{ secrets.GH_CLIENT_SECRET }}\" \\\n            -d \"code=${{ secrets.GH_AUTH_CODE }}\" \\\n            https:\/\/github.com\/login\/oauth\/access_token \\\n            | grep access_token | cut -d= -f2 | cut -d&amp; -f1)\n          echo \"OAUTH_TOKEN=$TOKEN\" &gt;&gt; $GITHUB_ENV\n\n      - name: Use token\n        run: curl -H \"Authorization: token $OAUTH_TOKEN\" https:\/\/api.github.com\/user\n<\/code><\/div><\/pre>\n\n\n\n<p>\ud83d\udccc \u042d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f pull requests \u0438\u043b\u0438 \u0447\u0442\u0435\u043d\u0438\u044f API GitHub \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e OAuth.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"featured_media":0,"parent":2927,"menu_order":178,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-4130","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/comments?post=4130"}],"version-history":[{"count":1,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4130\/revisions"}],"predecessor-version":[{"id":4132,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4130\/revisions\/4132"}],"up":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/2927"}],"next":[{"title":"Phishing\u00a0(\u0424\u0438\u0448\u0438\u043d\u0433)","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/phishing\/","href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4206"}],"prev":[{"title":"Continuous Integration (CI)","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/continuous-integration\/","href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4099"}],"wp:attachment":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/media?parent=4130"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/doc_tag?post=4130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}