kibibit
36 |2-Step Verification
37 |This extra step shows it’s really you trying to sign in
38 |Use your Security Key to sign in
89 |Insert your Security Key into your computer's USB port. If it has a button, tap it.
90 |├── README.md ├── favicon.ico ├── LICENSE ├── css └── style.css ├── scss └── style.scss ├── index.html └── js └── index.js /README.md: -------------------------------------------------------------------------------- 1 | # 2FA 2 | 2FA modal for yubikey style keys 3 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/2FA/master/favicon.ico -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 kibibit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | } 4 | 5 | *, *:before, *:after { 6 | box-sizing: inherit; 7 | } 8 | 9 | html, body { 10 | padding: 0px; 11 | margin: 0px; 12 | overflow: hidden; 13 | } 14 | 15 | #particles-js, 16 | #particles-js2 { 17 | top: 0; 18 | left: 0; 19 | position: absolute; 20 | width: 100%; 21 | height: 100%; 22 | background-color: #f25757; 23 | background-image: url(""); 24 | background-repeat: no-repeat; 25 | background-size: cover; 26 | background-position: 50% 50%; 27 | } 28 | #particles-js canvas, 29 | #particles-js2 canvas { 30 | filter: url(#goo); 31 | display: block; 32 | vertical-align: bottom; 33 | } 34 | 35 | #particles-js2 { 36 | background-color: transparent; 37 | } 38 | 39 | .bg-overlay { 40 | position: absolute; 41 | } 42 | 43 | .red { 44 | color: #f25757; 45 | } 46 | 47 | .blue { 48 | color: #00A2C9; 49 | } 50 | 51 | .yellow { 52 | color: #EEB146; 53 | } 54 | 55 | h1 { 56 | font-family: 'Righteous', cursive; 57 | } 58 | 59 | .bg-overlay { 60 | width: 100vw; 61 | height: 100vh; 62 | background-color: rgba(0, 0, 0, 0.4); 63 | z-index: 2; 64 | } 65 | 66 | body { 67 | margin: 0; 68 | background-color: #F25757; 69 | width: 100vw; 70 | height: 100vh; 71 | display: flex; 72 | justify-content: center; 73 | align-items: center; 74 | font-family: roboto,arial,sans-serif; 75 | font-size: 14px; 76 | } 77 | 78 | .card { 79 | top: 0; 80 | left: 0; 81 | right: 0; 82 | bottom: 0; 83 | margin: auto; 84 | position: absolute; 85 | max-width: 360px; 86 | max-height: 460px; 87 | background-color: white; 88 | border-radius: 5px; 89 | padding: 0 40px; 90 | overflow-x: hidden; 91 | box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2); 92 | z-index: 3; 93 | transition: all 300ms; 94 | overflow-y: hidden; 95 | } 96 | .card.transition { 97 | border-radius: 100%; 98 | max-width: 80px; 99 | max-height: 80px; 100 | overflow: hidden; 101 | background: #EEB146; 102 | } 103 | .card.transition .loader { 104 | opacity: 1; 105 | } 106 | .card .content { 107 | transition: all 200ms; 108 | } 109 | .card #troubles { 110 | color: #4285f4; 111 | display: inline-block; 112 | padding: 10px; 113 | padding-left: 0; 114 | border-radius: 5px; 115 | cursor: pointer; 116 | } 117 | .card .splash { 118 | background-image: linear-gradient(to bottom, rgba(233, 233, 233, 0) 0%, rgba(233, 233, 233, 0) 62.22%, #e9e9e9 40.22%, rgba(233, 233, 233, 0) 100%); 119 | position: relative; 120 | left: -42px; 121 | width: 404px; 122 | } 123 | .card .splash svg { 124 | transform: scale(-1, 1); 125 | width: 50%; 126 | max-width: 90vw; 127 | } 128 | .card .splash #yubikey-identifier { 129 | animation-duration: 1s; 130 | animation-name: insert; 131 | animation-iteration-count: infinite; 132 | animation-direction: alternate; 133 | animation-timing-function: ease-in-out; 134 | } 135 | 136 | @keyframes insert { 137 | 0% { 138 | transform: translateX(-10px); 139 | } 140 | 20% { 141 | transform: translateX(-10px); 142 | } 143 | 80% { 144 | transform: translateX(0); 145 | } 146 | 100% { 147 | transform: translateX(0); 148 | } 149 | } 150 | .loader { 151 | opacity: 0; 152 | width: 80px; 153 | height: 80px; 154 | position: absolute; 155 | left: 0; 156 | top: 0; 157 | right: 0; 158 | bottom: 0; 159 | margin: auto; 160 | border: 0 solid transparent; 161 | border-radius: 50%; 162 | transition: all 450ms; 163 | background: #EEB146; 164 | } 165 | .loader:before, .loader:after { 166 | content: ''; 167 | border-radius: 50%; 168 | width: inherit; 169 | height: inherit; 170 | position: absolute; 171 | top: 0; 172 | left: 0; 173 | animation: loader-07 1s linear infinite; 174 | opacity: 0; 175 | background: #f25757; 176 | } 177 | .loader:before { 178 | animation-delay: 1s; 179 | background: #00A2C9; 180 | } 181 | .loader:after { 182 | animation-delay: .5s; 183 | } 184 | 185 | @keyframes loader-07 { 186 | 0% { 187 | transform: scale(0); 188 | opacity: 0; 189 | } 190 | 50% { 191 | opacity: 1; 192 | } 193 | 100% { 194 | transform: scale(1); 195 | opacity: 0; 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /scss/style.scss: -------------------------------------------------------------------------------- 1 | $red: #f25757; 2 | $blue: #00A2C9; 3 | $yellow: #EEB146; 4 | 5 | html { 6 | box-sizing: border-box; 7 | } 8 | 9 | *, *:before, *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | html, body { 14 | padding: 0px; 15 | margin: 0px; 16 | overflow: hidden; 17 | } 18 | 19 | #particles-js, 20 | #particles-js2 { 21 | top: 0; 22 | left: 0; 23 | position: absolute; 24 | width: 100%; 25 | height: 100%; 26 | background-color: $red; 27 | background-image: url(""); 28 | background-repeat: no-repeat; 29 | background-size: cover; 30 | background-position: 50% 50%; 31 | 32 | canvas { 33 | filter: url(#goo); 34 | display: block; 35 | vertical-align: bottom; 36 | } 37 | } 38 | 39 | #particles-js2 { 40 | background-color: transparent; 41 | } 42 | 43 | .bg-overlay { 44 | position: absolute; 45 | } 46 | 47 | .red { 48 | color: $red; 49 | } 50 | 51 | .blue { 52 | color: $blue; 53 | } 54 | 55 | .yellow { 56 | color: $yellow; 57 | } 58 | 59 | h1 { 60 | font-family: 'Righteous', cursive; 61 | } 62 | 63 | .bg-overlay { 64 | width: 100vw; 65 | height: 100vh; 66 | background-color: rgba(0, 0, 0, 0.4); 67 | z-index: 2; 68 | } 69 | 70 | body { 71 | margin: 0; 72 | background-color: #F25757; 73 | width: 100vw; 74 | height: 100vh; 75 | display: flex; 76 | justify-content: center; 77 | align-items: center; 78 | font-family: roboto,arial,sans-serif; 79 | font-size: 14px; 80 | } 81 | 82 | .card { 83 | top: 0; 84 | left: 0; 85 | right: 0; 86 | bottom: 0; 87 | margin: auto; 88 | position: absolute; 89 | max-width: 360px; 90 | max-height: 460px; 91 | background-color: white; 92 | border-radius: 5px; 93 | padding: 0 40px; 94 | overflow-x: hidden; 95 | box-shadow: 0 3px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2); 96 | z-index: 3; 97 | transition: all 300ms; 98 | 99 | // disabling y scroll for now 100 | overflow-y: hidden; 101 | 102 | &.transition { 103 | border-radius: 100%; 104 | max-width: 80px; 105 | max-height: 80px; 106 | overflow: hidden; 107 | background: $yellow; 108 | 109 | .loader { 110 | opacity: 1; 111 | } 112 | } 113 | 114 | .content { 115 | transition: all 200ms; 116 | } 117 | 118 | #troubles { 119 | color: #4285f4; 120 | display: inline-block; 121 | padding: 10px; 122 | padding-left: 0; 123 | border-radius: 5px; 124 | cursor: pointer; 125 | } 126 | 127 | .splash { 128 | background-image: linear-gradient(to bottom,rgba(233,233,233,0) 0%,rgba(233,233,233,0) 62.22%,rgba(233,233,233,1) 40.22%,rgba(233,233,233,0) 100%); 129 | position: relative; 130 | left: -42px; 131 | width: 404px; 132 | 133 | svg { 134 | transform: scale(-1,1); 135 | width: 50%; 136 | max-width: 90vw; 137 | } 138 | 139 | #yubikey-identifier { 140 | animation-duration: 1s; 141 | animation-name: insert; 142 | animation-iteration-count: infinite; 143 | animation-direction: alternate; 144 | animation-timing-function: ease-in-out; 145 | } 146 | } 147 | } 148 | 149 | @keyframes insert { 150 | 0% { transform: translateX(-10px); } 151 | 20% { transform: translateX(-10px); } 152 | 80% { transform: translateX(0); } 153 | 100% { transform: translateX(0); } 154 | } 155 | 156 | .loader { 157 | opacity: 0; 158 | width: 80px; 159 | height: 80px; 160 | position: absolute; 161 | left: 0; 162 | top: 0; 163 | right: 0; 164 | bottom: 0; 165 | margin: auto; 166 | border: 0 solid transparent; 167 | border-radius: 50%; 168 | transition: all 450ms; 169 | // transition-delay: 350ms; 170 | background: $yellow; 171 | // position: relative; 172 | &:before, 173 | &:after { 174 | content: ''; 175 | // border: .2em solid currentcolor; 176 | border-radius: 50%; 177 | width: inherit; 178 | height: inherit; 179 | position: absolute; 180 | top: 0; 181 | left: 0; 182 | animation: loader-07 1s linear infinite; 183 | opacity: 0; 184 | background: $red; 185 | } 186 | &:before { 187 | animation-delay: 1s; 188 | background: $blue; 189 | } 190 | &:after { 191 | animation-delay: .5s; 192 | } 193 | } 194 | 195 | @keyframes loader-07 { 196 | 0% { 197 | transform: scale(0); 198 | opacity: 0; 199 | } 200 | 50% { 201 | opacity: 1; 202 | } 203 | 100% { 204 | transform: scale(1); 205 | opacity: 0; 206 | } 207 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |This extra step shows it’s really you trying to sign in
38 |Insert your Security Key into your computer's USB port. If it has a button, tap it.
90 |