Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customization of Login Page Cognito

I know that there is possibility to customize some values on login page provided by cognito. But it isn't enough for me. Is it possible to customize it completely? I'm using only third pard federated identification there from web application. Is there possiblility to change grey background? Or put there completely different view?

like image 866
kosmit Avatar asked Nov 23 '18 16:11

kosmit


2 Answers

The only reliable solution is reimplementing from scratch the whole "create account / reset password / social login" interface using the npm package amazon-cognito-identity-js.

As a quick fix, amazon actually does not perform validation on the CSS values which are entered on the "UI Customization" form: you can actually inject any CSS you wish.

I would not rely on this for anything important, as it may not work for a long time, but it can be OK for a personal webpage / unpaid work / proof of concept that you need to show to investors for tomorrow.

Enter this:

enter this

Get this:

customized login page

like image 199
Eloims Avatar answered Sep 30 '22 14:09

Eloims


Since the background grey color can't be modified anymore, we can use some CSS tricks to change the background-color.

Just use multi-layer box-shadow and let the outside shadow be big enough to overlay the background.

Login screen:

Login screen

Doing something like:

.background-customizable {
  box-shadow: 0px 2px 20px rgba(0, 0, 0, 20%), 0 0 0 10000px #eee;
}
like image 42
Kroze Avatar answered Sep 30 '22 13:09

Kroze