Select to view content in your preferred language

Is it possible to customize the login page in portal for arcgis.

21140
39
08-22-2017 11:01 AM
akshayloya
Frequent Contributor

I've portal for Arcgis 10.5 (behind the firewall). I have to customize the login page with the client's company logo, banner and all those. How can I do this. Any work around ?

39 Replies
akshayloya
Frequent Contributor

Yes we did the same. But I found a better way eventually. We created a separate login page and wrote a code for login there itself. 

FabienLaganne1
New Contributor

Hi, I am trynig to create a separate login page as well, have you use the javascript api ? Is that possible to have an example of code ? Thanks in advance,
Fabien

akshayloya
Frequent Contributor

Hey,

Extremely sorry for the late reply, I don't usually follow Geonet regularly. I don't have the code right now but you can create a login page separately using javascript where the user puts in user name and password. This can then be validated with portal oAuth. The code for the same you can find in the ArcGIS API for JS website itself.  Check the below link:

OAuth Basic | ArcGIS API for JavaScript 3.27 

Hope it helps. 

Regards,

Akshay 

0 Kudos
DougKnight
Emerging Contributor

Eric,

I am in Cleburne, this is exactly what I was looking for.  My users wont know the details of their domain name and syntax.  Thank you for sharing

LindsayMaier
Occasional Contributor

Eric Peña‌, would you mind posting a screenshot of where exactly you did this in the HTML file? I'd appreciate it. This is exactly what I'm trying to do, but I don't see the <div id="signInStyle"> that you mentioned in your reply in my HTML file. Please and thank you!

0 Kudos
EricPeña
Frequent Contributor

Lindsay, here is the BODY block from the signin.html file.  This worked on Enterprise 10.6.1.  I've since upgraded to 10.7.1 and modifying the login page is slightly different.  Let me know if you're at 10.7.1 and I'll send you that information.

<body class="soria esri calciteBackground">
<div id="headerBanner" dojotype="arcgisonline.sharing.dijit.ClassificationBanner">
</div>
<div id="page-border" class="center center960" style="height: auto; overflow: hidden;" xdojotype="dijit.layout.BorderContainer" gutters="false" design="headline">
<div class="clearfix zindexfix">
<div id="header" class="grid_16_0"></div>

<div class="sub-nav">
<div class="container">
<h1 class="sub-nav-title"><span id="signInTitle"></span></h1>
</div>
</div>

</div>
<div class="respond-small" style="margin-top: 15px;">
<div>TEXT AND IMAGES HERE</div>
<div id="signInStyle">
</div>
<div style="clear:both; width: 100%;">
</div>
</div>
<div id="bottom" class="footer" region="bottom" style="width:100%">
</div>
</div>
<div id="footerBanner" dojotype="arcgisonline.sharing.dijit.ClassificationBanner">
</div>
</body>

LindsayMaier
Occasional Contributor

Eric Peña Thanks so much for responding so fast. We are indeed on 10.7.1 and would love that updated code. Thank you again!

0 Kudos
EricPeña
Frequent Contributor

Lindsay, in Portal 10.7.1 you'll need to edit some html script within the oauth2.js file. I'd be sure to make a copy of the original file before editing.

Found in:

[Portal Installation Folder]\ArcGIS\Portal\framework\webapps\arcgis#sharing\www\files\scripts\oauth2.js

 

Find the "content" div in the javascript file and add your custom html to the "font-size-1 page-title width-full" div.  In my case I added a "float:right" logo just after this div as well.

<div class="content">\n

<div class="content-wrap">\n

<div class="js-header header-bar flex flex-justify">\n

<div class="font-size-1 page-title width-full">\n

City of Waco GIS Portal<br>

<small>

COW Employees may sign in with their employee credentials:

<br>Username: <b>COW Username</b>

<br>Password: <b>COW Password</b>

</small>

</div>

<img src="https://gis.ci.waco.tx.us/wacologoblacksmall.png" style="float:right">

And this is what you get...

LindsayMaier
Occasional Contributor

Thank you!! When you upgraded from 10.6 to 10.7 versions, did you have to redo this, or did it naturally occur as part of the upgrade? We are pretty new to this and haven't yet had to upgrade versions, so we aren't sure what all will transfer from version to version and what all will need to be done manually. Thanks again for your help!

0 Kudos
EricPeña
Frequent Contributor

On upgrade I had to find where the sign-in design & configuration had changed and I had to redo it, it didn't carry over.  I imagine when we upgrade to 10.8 I'll have to do this again.  Now that I think of it I should post an Idea for a customizable sign-in for Portal.