@@ -632,12 +632,22 @@ async def _complete_device_code_authorization(
632632<!DOCTYPE html>
633633<html>
634634<head><title>Error</title>
635- <style>body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
636- .error {{ background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 15px; border-radius: 5px; color: #721c24; }}</style>
635+ <style>
636+ body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
637+ .error {{
638+ background-color: #f8d7da;
639+ border: 1px solid #f5c6cb;
640+ padding: 15px;
641+ border-radius: 5px;
642+ color: #721c24;
643+ }}
644+ </style>
637645</head>
638646<body>
639647 <h1>Authorization Failed</h1>
640- <div class="error">Invalid user code. It may have been mistyped, or the pending request may have expired.</div>
648+ <div class="error">
649+ Invalid user code. It may have been mistyped, or the pending request may have expired.
650+ </div>
641651 <br/><a href="{ action .rsplit ('?' , 1 )[0 ]} ?code={ code } ">Try again</a>
642652</body>
643653</html>
@@ -651,12 +661,23 @@ async def _complete_device_code_authorization(
651661<!DOCTYPE html>
652662<html>
653663<head><title>Authentication Failed</title>
654- <style>body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
655- .error {{ background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 15px; border-radius: 5px; color: #721c24; }}</style>
664+ <style>
665+ body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
666+ .error {{
667+ background-color: #f8d7da;
668+ border: 1px solid #f5c6cb;
669+ padding: 15px;
670+ border-radius: 5px;
671+ color: #721c24;
672+ }}
673+ </style>
656674</head>
657675<body>
658676 <h1>Authentication Failed</h1>
659- <div class="error">User code was correct but authentication with the identity provider failed. Please contact the administrator.</div>
677+ <div class="error">
678+ User code was correct but authentication with the identity provider failed.
679+ Please contact the administrator.
680+ </div>
660681</body>
661682</html>
662683"""
@@ -668,8 +689,16 @@ async def _complete_device_code_authorization(
668689<!DOCTYPE html>
669690<html>
670691<head><title>Authorization Failed</title>
671- <style>body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
672- .error {{ background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 15px; border-radius: 5px; color: #721c24; }}</style>
692+ <style>
693+ body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
694+ .error {{
695+ background-color: #f8d7da;
696+ border: 1px solid #f5c6cb;
697+ padding: 15px;
698+ border-radius: 5px;
699+ color: #721c24;
700+ }}
701+ </style>
673702</head>
674703<body>
675704 <h1>Authorization Failed</h1>
@@ -693,12 +722,23 @@ async def _complete_device_code_authorization(
693722<!DOCTYPE html>
694723<html>
695724<head><title>Success</title>
696- <style>body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
697- .success {{ background-color: #d4edda; border: 1px solid #c3e6cb; padding: 15px; border-radius: 5px; color: #155724; }}</style>
725+ <style>
726+ body {{ font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }}
727+ .success {{
728+ background-color: #d4edda;
729+ border: 1px solid #c3e6cb;
730+ padding: 15px;
731+ border-radius: 5px;
732+ color: #155724;
733+ }}
734+ </style>
698735</head>
699736<body>
700737 <h1>Success!</h1>
701- <div class="success">You have been authenticated. Return to your terminal application - within { DEVICE_CODE_POLLING_INTERVAL } seconds it should be successfully logged in.</div>
738+ <div class="success">
739+ You have been authenticated. Return to your terminal application -
740+ within { DEVICE_CODE_POLLING_INTERVAL } seconds it should be successfully logged in.
741+ </div>
702742</body>
703743</html>
704744"""
@@ -738,8 +778,21 @@ async def device_code_form(
738778 h1 {{ color: #333; }}
739779 form {{ margin-top: 20px; }}
740780 label {{ display: block; margin-bottom: 10px; }}
741- input[type="text"] {{ padding: 10px; font-size: 16px; width: 200px; text-transform: uppercase; }}
742- input[type="submit"] {{ padding: 10px 20px; font-size: 16px; background-color: #007bff; color: white; border: none; cursor: pointer; margin-top: 10px; }}
781+ input[type="text"] {{
782+ padding: 10px;
783+ font-size: 16px;
784+ width: 200px;
785+ text-transform: uppercase;
786+ }}
787+ input[type="submit"] {{
788+ padding: 10px 20px;
789+ font-size: 16px;
790+ background-color: #007bff;
791+ color: white;
792+ border: none;
793+ cursor: pointer;
794+ margin-top: 10px;
795+ }}
743796 input[type="submit"]:hover {{ background-color: #0056b3; }}
744797 </style>
745798</head>
0 commit comments