PageSourceSearch

https://eideasy-docs.netlify.app/assets/eideasy-authentication-page-flow.html-ca663111.js

js eideasy-docs.netlify.app collected 2026-10-03 10:42:57 UTC 14,894 bytes, 23 lines download raw bytes

1import{_ as i,r as l,o as u,c as p,e as a,b as e,d as n,a as s,w as d}from"./app-4488e322.js";const c={},h={href:"https://id.eideasy.com/admin/clientlist",target:"_blank",rel:"noopener noreferrer"},m={href:"https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes",target:"_blank",rel:"noopener noreferrer"},g={href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization",target:"_blank",rel:"noopener noreferrer"},k={class:"custom-container warning"};function v(y,t){const o=l("ExternalLinkIcon"),r=l("RouterLink");return u(),p("div",null,[t[37]||(t[37]=a('<h1 id="eid-easy-authentication-page-flow" tabindex="-1"><a class="header-anchor" href="#eid-easy-authentication-page-flow" aria-hidden="true">#</a> eID Easy authentication page flow</h1><div class="custom-container warning"><p class="custom-container-title">MOBILE DEVICES AND IFRAMES</p><p>On mobile devices, eID and signing flows must be opened in the device’s default browser; in-app browsers are not supported.</p><p>eID and signing flows cannot be displayed within an iframe on any device.</p><p>For more information, see: <a href="../mobile-devices-and-iframes">Mobile devices and iframes</a>.</p></div><p>For a complete authentication of a user, you need to follow these steps:</p><h3 id="_1-redirect-the-user-to-eid-easy-authorize-endpoint" tabindex="-1"><a class="header-anchor" href="#_1-redirect-the-user-to-eid-easy-authorize-endpoint" aria-hidden="true">#</a> 1. Redirect the user to eID Easy authorize endpoint.</h3><p>URL: <code>https://id.eideasy.com/oauth/authorize</code></p><h4 id="required-query-parameters" tabindex="-1"><a class="header-anchor" href="#required-query-parameters" aria-hidden="true">#</a> Required query parameters:</h4>',6)),e("table",null,[t[5]||(t[5]=e("thead",null,[e("tr",null,[e("th",null,"Parameter"),e("th",null,"Description")])],-1)),e("tbody",null,[t[3]||(t[3]=e("tr",null,[e("td",null,[e("code",null,"client_id")]),e("td",null,"client_id value that you got when registering the website")],-1)),e("tr",null,[t[2]||(t[2]=e("td",null,[e("code",null,"redirect_uri")],-1)),e("td",null,[t[1]||(t[1]=n("You set this value when you registered your website in ",-1)),e("a",h,[t[0]||(t[0]=n("My Webpages",-1)),s(o)])])]),t[4]||(t[4]=e("tr",null,[e("td",null,[e("code",null,"response_type")]),e("td",null,[n("This is always "),e("code",null,"code"),n(".")])],-1))])]),t[38]||(t[38]=e("h4",{id:"optional-query-parameters",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#optional-query-parameters","aria-hidden":"true"},"#"),n(" Optional query parameters:")],-1)),e("table",null,[t[23]||(t[23]=e("thead",null,[e("tr",null,[e("th",null,"Parameter"),e("th",null,"Description"),e("th",null,"Values")])],-1)),e("tbody",null,[t[14]||(t[14]=e("tr",null,[e("td",null,[e("code",null,"state")]),e("td",null,"RECOMMENDED: A unique string to prevent CSRF attacks."),e("td",null,"Any string.")],-1)),e("tr",null,[t[7]||(t[7]=e("td",null,[e("code",null,"lang")],-1)),t[8]||(t[8]=e("td",null,"Language of the user. Use 2-letter codes.",-1)),e("td",null,[e("a",m,[t[6]||(t[6]=n("ISO 639-1",-1)),s(o)])])]),e("tr",null,[t[12]||(t[12]=e("td",null,[e("code",null,"start")],-1)),t[13]||(t[13]=e("td",null,"User’s selected method code. Authentication begins with this method if specified.",-1)),e("td",null,[t[10]||(t[10]=n("See available method ",-1)),s(r,{to:"/supported-methods/"},{default:d(()=>[...t[9]||(t[9]=[n("codes",-1)])]),_:1}),t[11]||(t[11]=n(".",-1))])]),t[15]||(t[15]=e("tr",null,[e("td",null,[e("code",null,"phone")]),e("td",null,"Supported methods (e.g Mobile-ID) mobile number prefill."),e("td",null,"Mobile number.")],-1)),t[16]||(t[16]=e("tr",null,[e("td",null,[e("code",null,"idcode")]),e("td",null,"Supported methods (e.g Smart-ID and Mobile-ID) number prefill."),e("td",null,"ID code.")],-1)),t[17]||(t[17]=e("tr",null,[e("td",null,[e("code",null,"country")]),e("td",null,"Country preselect."),e("td",null,[e("code",null,"EE"),n(", "),e("code",null,"LT"),n(", "),e("code",null,"LV"),n(", etc.")])],-1)),t[18]||(t[18]=e("tr",null,[e("td",null,[e("code",null,"lang_selector")]),e("td",null,"Determines whether the language selector is shown or not."),e("td",null,[e("code",null,"true"),n(" | "),e("code",null,"false"),n(".")])],-1)),t[19]||(t[19]=e("tr",null,[e("td",null,[e("code",null,"cancel_button")]
1),e("td",null,"Determines whether the cancel button is shown or not."),e("td",null,[e("code",null,"true"),n(" | "),e("code",null,"false"),n(".")])],-1)),t[20]||(t[20]=e("tr",null,[e("td",null,[e("code",null,"allow_method_change")]),e("td",null,[n("If set to "),e("code",null,"false"),n(", the user can only use the method provided with the "),e("code",null,"start"),n(" param and the "),e("code",null,"country"),n(" param, unless "),e("code",null,"allow_country_change=true"),n(".")]),e("td",null,[e("code",null,"true"),n(" | "),e("code",null,"false"),n(".")])],-1)),t[21]||(t[21]=e("tr",null,[e("td",null,[e("code",null,"allow_country_change")]),e("td",null,[n("Determines whether the user can change country in the fixed-method flow. Effective only when "),e("code",null,"allow_method_change=false"),n(". If set to "),e("code",null,"true"),n(", the "),e("code",null,"country"),n(" param is not required.")]),e("td",null,[e("code",null,"true"),n(" | "),e("code",null,"false"),n(".")])],-1)),t[22]||(t[22]=e("tr",null,[e("td",null,[e("code",null,"scope")]),e("td",null,[n("A "),e("strong",null,"+"),n(" separated list of scopes.")]),e("td")],-1))])]),t[39]||(t[39]=a(`<p><strong>Example</strong>: <code>https://id.eideasy.com/oauth/authorize?client_id=pM...m5&amp;redirect_uri=https://your-site.com/login&amp;response_type=code&amp;state=my-state-1</code></p><div class="custom-container warning"><p class="custom-container-title">Important Information about Scopes.</p><ol><li>Scopes are enabled per method. Please contact us to enable scopes for the supported method(s).</li><li>Not all methods support scopes.</li></ol></div><div class="custom-container danger"><p class="custom-container-title">‼️</p><p>We recommend using additional scopes in a situation where you automatically choose a method for your end user, that is use <code>allow_method_change=false</code> together with <code>start</code>, and also <code>country</code> when <code>allow_country_change</code> is not set to <code>true</code>. Your users would experience error if they are able to choose methods for themselves and scopes are not enabled for those methods.</p></div><h3 id="_2-user-will-go-through-the-authentication-flow-on-our-login-page" tabindex="-1"><a class="header-anchor" href="#_2-user-will-go-through-the-authentication-flow-on-our-login-page" aria-hidden="true">#</a> 2. User will go through the authentication flow on our login page.</h3><p>Don’t worry, we’ll send them back.</p><h3 id="_3-after-authentication-user-is-redirected-to-your-redirect-uri" tabindex="-1"><a class="header-anchor" href="#_3-after-authentication-user-is-redirected-to-your-redirect-uri" aria-hidden="true">#</a> 3. After authentication, user is redirected to your redirect_uri.</h3><p>e.g <code>https://your-site.com/login?code=j93jd0qk</code>. Notice you received a query param named <code>code</code>. We’ll use this in the next step.</p><p>If you have set the <code>state</code> parameter in the step 1, your redirect_uri will also contain the <code>state</code> parameter. e.g <code>https://your-site.com/login?code=j93jd0qk&amp;state=xyz123</code>. Ensure that the <code>state</code> value is the same as the one you set in step 1.</p><h3 id="_4-make-a-post-request-eid-easy-server-to-ask-for-access-token" tabindex="-1"><a class="header-anchor" href="#_4-make-a-post-request-eid-easy-server-to-ask-for-access-token" aria-hidden="true">#</a> 4. Make a POST request eID Easy server to ask for access token.</h3><p>URL: <code>https://id.eideasy.com/oauth/access_token</code></p><p>Required headers:</p><table><thead><tr><th>Header Name</th><th>Value</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td><code>application/x-www-form-urlencoded</code></td></tr></tbody></table><p><strong>Required body parameters:</strong></p><table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>client_id value that you got when registering the website</td></tr><tr><td><code>client_secret</code></td><td>secret value that you got when registering the website</td></tr><tr><td><code>redirect_uri</code></td><td>redirect_uri value that you entered when registering the website</td></tr><tr><td><code>code</code></td><td>code value that was set when redirecting user back from authorization endpoint</td></tr><tr><td><code>grant_type</code></td><td>This is always <code>authorization_code</code>.</td></tr></tbody></table><p><strong>Example Request body:</strong></p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
2  <span class="token property">&quot;code&quot;</span><span class="token operator">:</span> <span class="token string">&quot;j93jd0qk&quot;</span><span class="token punctuation">,</span>
3  <span class="token property">&quot;grant_type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;authorization_code&quot;</span><span class="token punctuation">,</span>
4  <span class="token property">&quot;client_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;pM...m5&quot;</span><span class="token punctuation">,</span>
5  <span class="token property">&quot;client_secret&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Iu...ch&quot;</span><span class="token punctuation">,</span>
6  <span class="token property">&quot;redirect_uri&quot;</span><span class="token operator">:</span> <span class="token string">&quot;http://example.com/login&quot;</span>
7<span class="token punctuation">}</span>
8</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Example response</strong>:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
9  <span class="token property">&quot;access_token&quot;</span><span class="token operator">:</span><span class="token string">&quot;yF...zc&quot;</span><span class="token punctuation">,</span>
10  <span class="token property">&quot;token_type&quot;</span><span class="token operator">:</span><span class="token string">&quot;Bearer&quot;</span><span class="token punctuation">,</span>
11  <span class="token property">&quot;expires_in&quot;</span><span class="token operator">:</span><span class="token number">3600</span>
12<span class="token punctuation">}</span>
13</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You’ll need the <code>access_token</code> value in the next step.</p><h3 id="_5-make-a-get-request-to-eid-easy-server-to-ask-for-user-details" tabindex="-1"><a class="header-anchor" href="#_5-make-a-get-request-to-eid-easy-server-to-ask-for-user-details" aria-hidden="true">
13#</a> 5. Make a GET request to eID Easy server to ask for user details.</h3><p>URL: <code>https://id.eideasy.com/api/v2/user_data</code></p>`,21)),e("p",null,[t[25]||(t[25]=n("Add the ",-1)),t[26]||(t[26]=e("code",null,"access_token",-1)),t[27]||(t[27]=n(" value to the ",-1)),e("a",g,[t[24]||(t[24]=n("HTTP Authorization request header",-1)),s(o)]),t[28]||(t[28]=n(".",-1))]),t[40]||(t[40]=a(`<p><strong>Example</strong>:</p><div class="language-http line-numbers-mode" data-ext="http"><pre class="language-http"><code><span class="token header"><span class="token header-name keyword">Authorization</span><span class="token punctuation">:</span> <span class="token header-value">&#39;Bearer yF...zc&#39;</span></span>
14</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p><strong>Example response:</strong></p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
15  <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;OK&quot;</span><span class="token punctuation">,</span>
16  <span class="token property">&quot;idcode&quot;</span><span class="token operator">:</span> <span class="token string">&quot;39111123456&quot;</span><span class="token punctuation">,</span>
17  <span class="token property">&quot;lastname&quot;</span><span class="token operator">:</span> <span class="token string">&quot;John&quot;</span><span class="token punctuation">,</span>
18  <span class="token property">&quot;firstname&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Smith&quot;</span><span class="token punctuation">,</span>
19  <span class="token property">&quot;current_login_method&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ee-id-login&quot;</span><span class="token punctuation">,</span>
20  <span class="token property">&quot;birth_date&quot;</span><span class="token operator">:</span> <span class="token string">&quot;1991-11-11&quot;</span><span class="token punctuation">,</span>
21  <span class="token property">&quot;country&quot;</span><span class="token operator">:</span> <span class="token string">&quot;EE&quot;</span>
22<span class="token punctuation">}</span>
23</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,4)),e("div",k,[t[36]||(t[36]=e("p",{class:"custom-container-title"},"About returned data",-1)),e("p",null,[t[30]||(t[30]=n("Not all methods return the same data. For example, some methods do not return the ",-1)),t[31]||(t[31]=e("code",null,"idcode",-1)),t[32]||(t[32]=n(" or ",-1)),t[33]||(t[33]=e("code",null,"birth_date",-1)),t[34]||(t[34]=n(" values. See ",-1)),s(r,{to:"/guide/test-environment.html#electronic-identities-in-test-environment"},{default:d(()=>[...t[29]||(t[29]=[n("Electronic Identities in test environment",-1)])]),_:1}),t[35]||(t[35]=n(" for more details about the returned data of each methods.",-1))])])])}const q=i(c,[["render",v],["__file","eideasy-authentication-page-flow.html.vue"]]);export{q as default};

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.