<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Identity Manager to verify Application Access programmatically without redirect. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1395568#M83995</link>
    <description>&lt;P&gt;I found a workaround, if you ever run into this, but it requires a username / password.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const param = {
                    username: this.username,
                    password: this.password
                }

                // &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69004"&gt;@ts&lt;/a&gt;-ignore
                esriId.generateToken(serverInfo, param).then((tokenRes: any) =&amp;gt; {
                    esriId.registerToken({server: serverURL, token: tokenRes.token});
                    esriId.checkAppAccess(serverURL, appId).then((getCredRes) =&amp;gt; {
                        r(getCredRes);
                    }).catch((error) =&amp;gt; {
                        console.log('Error - Checking App Access');
                        console.log(error);
                        j(error);
                    })
                    r(serverURL);
                }).catch((error) =&amp;gt; {
                    console.log('Error - Generating Token');
                    console.log(error);
                    j(error);
                })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Then you'll be able to use the connection without getting stopped :).&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 20:46:16 GMT</pubDate>
    <dc:creator>AndrewMurdoch1</dc:creator>
    <dc:date>2024-03-13T20:46:16Z</dc:date>
    <item>
      <title>Using Identity Manager to verify Application Access programmatically without redirect.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1394813#M83973</link>
      <description>&lt;P&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;I'm trying to verify my application settings without having to direct through the login system.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a page with the following formation on it (this is an Angular Application):&lt;BR /&gt;&lt;BR /&gt;Server URL&lt;BR /&gt;App ID&lt;BR /&gt;App Secret&lt;BR /&gt;Server Type:&amp;nbsp; Online vs Enterprise&lt;BR /&gt;Token URL&lt;BR /&gt;&lt;BR /&gt;What I want, is to pass the data into the Identity Manager and have it give me back a successful response, to verify the data is correct.&amp;nbsp;&amp;nbsp; Every time I call the Identity Manager, with this flow:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;            const info = new OAuthInfo({
                appId: portalConfig.appId,
                flowType: 'auto',
                popup: popup
            });

            IdentityManager.registerOAuthInfos([info]);
            IdentityManager.getCredential(portalConfig.serverURL + '/sharing').then(() =&amp;gt; {
                IdentityManager.checkSignInStatus(portalConfig.serverURL + "/sharing").then(() =&amp;gt; {
                    r(portalConfig.serverURL);
                }).catch((error) =&amp;gt; {
                    console.log('Error - Identity Manager - Check Sign In Status');
                    console.log(error);
                    j(error);
                })
            }).catch((error) =&amp;gt; {
                console.log('Error - Identity Manager - Get Credential');
                console.log(error);
                j(error);
            })&lt;/LI-CODE&gt;&lt;P&gt;I get redirected to a window that asks if I want to allow that connection&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="permission-box.png" style="width: 200px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97742i9F006DFAF9A2940B/image-size/small?v=v2&amp;amp;px=200" role="button" title="permission-box.png" alt="permission-box.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;How can I bypass this Windows?&amp;nbsp; I'm using ArcGIS Code 4.29.7.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 18:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1394813#M83973</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2024-03-12T18:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Identity Manager to verify Application Access programmatically without redirect.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1395568#M83995</link>
      <description>&lt;P&gt;I found a workaround, if you ever run into this, but it requires a username / password.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const param = {
                    username: this.username,
                    password: this.password
                }

                // &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69004"&gt;@ts&lt;/a&gt;-ignore
                esriId.generateToken(serverInfo, param).then((tokenRes: any) =&amp;gt; {
                    esriId.registerToken({server: serverURL, token: tokenRes.token});
                    esriId.checkAppAccess(serverURL, appId).then((getCredRes) =&amp;gt; {
                        r(getCredRes);
                    }).catch((error) =&amp;gt; {
                        console.log('Error - Checking App Access');
                        console.log(error);
                        j(error);
                    })
                    r(serverURL);
                }).catch((error) =&amp;gt; {
                    console.log('Error - Generating Token');
                    console.log(error);
                    j(error);
                })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Then you'll be able to use the connection without getting stopped :).&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 20:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1395568#M83995</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2024-03-13T20:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Identity Manager to verify Application Access programmatically without redirect.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1397718#M84057</link>
      <description>&lt;P&gt;&lt;SPAN&gt;An instance of&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/ArcGISIdentityManager/" target="_blank" rel="noopener"&gt;ArcGISIdentityManager&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;can be created with several different methods including helper methods for OAuth 2.0&amp;nbsp;&lt;/SPAN&gt;user authentication&lt;SPAN&gt;&amp;nbsp;workflows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import { ArcGISIdentityManager } from "@esri/arcgis-rest-request"; ArcGISIdentityManager.beginOAuth2({ clientId: "YOUR_CLIENT_ID", redirectUri: "YOUR_REDIRECT_URI" }).then(&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;manager&lt;/SPAN&gt;&lt;SPAN class=""&gt;) =&amp;gt;&lt;/SPAN&gt; { console.log(manager); });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Refer this link for more details -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/authentication/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/arcgis-rest-js/authentication/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is not recommended to construct&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ArcGISIdentityManager&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;directly&lt;/STRONG&gt;. Instead there are several static methods used for specific workflows. The 2 primary workflows relate to oAuth 2.0:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/ArcGISIdentityManager/#beginOAuth2" target="_blank" rel="noopener"&gt;ArcGISIdentityManager.beginOAuth2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/ArcGISIdentityManager/#completeOAuth2()" target="_blank" rel="noopener"&gt;ArcGISIdentityManager.completeOAuth2()&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for oAuth 2.0 in browser-only environment.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/ArcGISIdentityManager/#authorize" target="_blank" rel="noopener"&gt;ArcGISIdentityManager.authorize&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/ArcGISIdentityManager/#exchangeAuthorizationCode" target="_blank" rel="noopener"&gt;ArcGISIdentityManager.exchangeAuthorizationCode&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for oAuth 2.0 for server-enabled application.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Mar 2024 08:20:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-to-verify-application/m-p/1397718#M84057</guid>
      <dc:creator>AnjulPandey</dc:creator>
      <dc:date>2024-03-19T08:20:44Z</dc:date>
    </item>
  </channel>
</rss>

