Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| /** | |
| * A collection of helper prototype for everyday DOM traversal, manipulation, | |
| * and event binding. Sort of a minimalist jQuery, mainly for demonstration | |
| * purposes. MIT @ m3g4p0p | |
| */ | |
| window.$ = (function (undefined) { | |
| /** | |
| * Duration constants | |
| * @type {Object} |
| const singleton = Symbol(); | |
| const singletonEnforcer = Symbol(); | |
| class Singleton { | |
| constructor(enforcer) { | |
| if (enforcer !== singletonEnforcer) { | |
| throw new Error('Cannot construct singleton'); | |
| } | |
| this._type = 'Singleton'; |
| let instance; | |
| class Singleton { | |
| constructor() { | |
| if (!instance) { | |
| instance = this; | |
| } | |
| this._type = 'Singleton'; | |
| return instance; |
| // Live example: https://goo.gl/xJblcx | |
| .Q(@breaks; @rules;) { | |
| // If there's only one breakpoint: | |
| & when (length(@breaks) = 1) { | |
| @query: ~"(min-width: @{breaks}px)"; | |
| @media screen and @query {@rules();}; | |
| } | |
| // If there's two breakpoints: | |
| & when (length(@breaks) = 2) { |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |