(length: number)
| 13 | 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=520,top=150,left=150'; |
| 14 | |
| 15 | const createRandomString = (length: number) => { |
| 16 | const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
| 17 | return Array.from({ length }, () => charset.charAt(Math.floor(Math.random() * charset.length))).join(''); |
| 18 | }; |
| 19 | |
| 20 | const createAuthorizeUrl = (state: string) => { |
| 21 | const parameters = Object.entries({ |