{"id":6547,"date":"2021-07-05T23:50:19","date_gmt":"2021-07-05T23:50:19","guid":{"rendered":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/"},"modified":"2021-07-06T07:36:14","modified_gmt":"2021-07-06T07:36:14","slug":"auth","status":"publish","type":"docs","link":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/","title":{"rendered":"Auth"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">Epic Games Services uses the&nbsp;<a href=\"https:\/\/tools.ietf.org\/html\/rfc6749\">OAuth 2.0<\/a>&nbsp;protocol for authentication and authorization, supporting common-use cases for web servers and client-side applications. Epic has also introduced custom grant types for some specific use cases.\n\nBefore starting, you will need to obtain OAuth 2.0 client credentials from Epic. These will be in the form of a <strong>Client ID<\/strong> and <strong>Client Secret<\/strong>, and will be used when requesting an access token from the Epic authorization server. See our guide on&nbsp;<a href=\"https:\/\/dev.epicgames.com\/docs\/services\/en-US\/EpicAccountServices\/GettingStarted\/index.html\">Getting Started with Epic Account Services<\/a>&nbsp;for more details. <\/pre>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-vivid-cyan-blue-background-color has-background\" href=\"https:\/\/dev.epicgames.com\/docs\/services\/en-US\/WebAPIRef\/AuthWebAPI\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Auth Web Documentation<\/a><\/div>\n\n\n\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" href=\"https:\/\/dev.epicgames.com\/portal\" target=\"_blank\" rel=\"noreferrer noopener\">EOS Developer Portal<\/a><\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><em>Note that the AccessToken in this example <strong>will not work<\/strong> for creating a RoomToken as that requires a <strong>TrustedServer<\/strong> Client. You must use the <strong><a href=\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/connect\/\">Connect <\/a><\/strong>interface for this.<\/em><\/p>\n\n\n\n<p class=\"has-text-align-center\"><em>Note that this authentication flow is not supported on Mobile devices.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Setting up a Redirect URL<\/strong><\/h2>\n\n\n\n<p>Before getting started we need to setup our Redirect URL, the web browser will redirect the user to this address upon successful Epic Authentication and the plugin will then use this URL to determine the Authentication Code from the user.<\/p>\n\n\n\n<p>Begin by logging into your <strong>Developer Portal<\/strong> and go to your <strong>Product Settings<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg\" alt=\"\" class=\"wp-image-6566\" srcset=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg 1024w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-300x162.jpg 300w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-768x416.jpg 768w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1536x832.jpg 1536w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg 1705w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In this example we&#8217;re going to be using <strong>https:\/\/eeldev.com\/auth<\/strong> as our <strong>Redirect URL<\/strong>, you can setup your own Web Server to use for this, but you can also continue to use the eelDev host if you wish.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1-1024x559.jpg\" alt=\"\" class=\"wp-image-6567\" srcset=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1-1024x559.jpg 1024w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1-300x164.jpg 300w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1-768x419.jpg 768w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1-1536x839.jpg 1536w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/2-1.jpg 1705w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Initiate Epic Authentication<\/strong><\/h2>\n\n\n\n<p>You can use the Web plugin to Authenticate using Epic Accounts to get a Epic Account AccessToken, lets take a look at an example.<\/p>\n\n\n\n<p>The first step is to invoke &#8220;InitiateEpicAuthentication&#8221;, this node will attempt to open a Web Browser for the user so that they can authenticate with their Epic Account, after they&#8217;ve authenticated they will be redirected to the &#8220;<strong>Redirect URI<\/strong>&#8221; parameter. In this example you&#8217;ll be redirected to the eelDev host where the plugin will attempt to get the Authentication Code returned from Epic. <\/p>\n\n\n\n<p>Feel free to use your own web host for the Redirect URL.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"362\" src=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/50aca0c5299ee807f44e71f59356024f.png\" alt=\"\" class=\"wp-image-6560\" srcset=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/50aca0c5299ee807f44e71f59356024f.png 450w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/50aca0c5299ee807f44e71f59356024f-300x241.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Requesting Auth Access Token<\/strong><\/h2>\n\n\n\n<p>After receiving our <strong>Authentication Code<\/strong> from the <strong>Initiate Epic Authentication<\/strong> function we&#8217;re going to use this code to <strong>Authenticate <\/strong>with the <strong>EOS Web API<\/strong>, see the example below.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><em>Note that the AccessToken in this example <strong>will not work<\/strong> for creating a RoomToken as that requires a <strong>TrustedServer<\/strong> Client. You must use the <strong><a href=\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/connect\/\">Connect <\/a><\/strong>interface for this.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-1024x389.jpg\" alt=\"\" class=\"wp-image-6575\" srcset=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-1024x389.jpg 1024w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-300x114.jpg 300w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-768x292.jpg 768w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-1536x584.jpg 1536w, https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/3-2048x778.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"featured_media":0,"parent":6509,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-6547","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Auth - eelDev<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auth - eelDev\" \/>\n<meta property=\"og:description\" content=\"Epic Games Services uses the&nbsp;OAuth 2.0&nbsp;protocol for authentication and authorization, supporting common-use cases for web servers and client-side applications. Epic has also introduced custom grant types for some specific use cases. Before starting, you will need to obtain OAuth 2.0 client credentials from Epic. These will be in the form of a Client ID and ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/\" \/>\n<meta property=\"og:site_name\" content=\"eelDev\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-06T07:36:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/\",\"url\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/\",\"name\":\"Auth - eelDev\",\"isPartOf\":{\"@id\":\"https:\/\/eeldev.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg\",\"datePublished\":\"2021-07-05T23:50:19+00:00\",\"dateModified\":\"2021-07-06T07:36:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage\",\"url\":\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg\",\"contentUrl\":\"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg\",\"width\":1705,\"height\":923},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eeldev.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EOSCore::Web\",\"item\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting Started\",\"item\":\"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Auth\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eeldev.com\/#website\",\"url\":\"https:\/\/eeldev.com\/\",\"name\":\"eelDev\",\"description\":\"eelDev.com\",\"publisher\":{\"@id\":\"https:\/\/eeldev.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eeldev.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eeldev.com\/#organization\",\"name\":\"eelDev\",\"url\":\"https:\/\/eeldev.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eeldev.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eeldev.com\/wp-content\/uploads\/2022\/12\/logo_new_transparent-4.png\",\"contentUrl\":\"https:\/\/eeldev.com\/wp-content\/uploads\/2022\/12\/logo_new_transparent-4.png\",\"width\":2048,\"height\":682,\"caption\":\"eelDev\"},\"image\":{\"@id\":\"https:\/\/eeldev.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Auth - eelDev","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/","og_locale":"en_US","og_type":"article","og_title":"Auth - eelDev","og_description":"Epic Games Services uses the&nbsp;OAuth 2.0&nbsp;protocol for authentication and authorization, supporting common-use cases for web servers and client-side applications. Epic has also introduced custom grant types for some specific use cases. Before starting, you will need to obtain OAuth 2.0 client credentials from Epic. These will be in the form of a Client ID and ... Read more","og_url":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/","og_site_name":"eelDev","article_modified_time":"2021-07-06T07:36:14+00:00","og_image":[{"url":"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/","url":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/","name":"Auth - eelDev","isPartOf":{"@id":"https:\/\/eeldev.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage"},"image":{"@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage"},"thumbnailUrl":"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1-1024x554.jpg","datePublished":"2021-07-05T23:50:19+00:00","dateModified":"2021-07-06T07:36:14+00:00","breadcrumb":{"@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#primaryimage","url":"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg","contentUrl":"https:\/\/eeldev.com\/wp-content\/uploads\/2021\/07\/1-1.jpg","width":1705,"height":923},{"@type":"BreadcrumbList","@id":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/auth\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eeldev.com\/"},{"@type":"ListItem","position":2,"name":"EOSCore::Web","item":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/"},{"@type":"ListItem","position":3,"name":"Getting Started","item":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/"},{"@type":"ListItem","position":4,"name":"Auth"}]},{"@type":"WebSite","@id":"https:\/\/eeldev.com\/#website","url":"https:\/\/eeldev.com\/","name":"eelDev","description":"eelDev.com","publisher":{"@id":"https:\/\/eeldev.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eeldev.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eeldev.com\/#organization","name":"eelDev","url":"https:\/\/eeldev.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eeldev.com\/#\/schema\/logo\/image\/","url":"https:\/\/eeldev.com\/wp-content\/uploads\/2022\/12\/logo_new_transparent-4.png","contentUrl":"https:\/\/eeldev.com\/wp-content\/uploads\/2022\/12\/logo_new_transparent-4.png","width":2048,"height":682,"caption":"eelDev"},"image":{"@id":"https:\/\/eeldev.com\/#\/schema\/logo\/image\/"}}]}},"comment_count":0,"_links":{"self":[{"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs\/6547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/comments?post=6547"}],"version-history":[{"count":23,"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs\/6547\/revisions"}],"predecessor-version":[{"id":6585,"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs\/6547\/revisions\/6585"}],"up":[{"embeddable":true,"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs\/6509"}],"next":[{"title":"Connect","link":"https:\/\/eeldev.com\/index.php\/docs\/eoscoreweb\/getting-started\/connect\/","href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/docs\/6525"}],"wp:attachment":[{"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/media?parent=6547"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/eeldev.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=6547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}