diff --git a/.changeset/fair-carrots-begin.md b/.changeset/fair-carrots-begin.md deleted file mode 100644 index ce200b4..0000000 --- a/.changeset/fair-carrots-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@telegram-auth/server": patch ---- - -Fixed web app detection diff --git a/packages/react/docs/README.md b/packages/react/docs/README.md index 1a85f55..bca0221 100644 --- a/packages/react/docs/README.md +++ b/packages/react/docs/README.md @@ -41,7 +41,7 @@ https://core.telegram.org/widgets/login #### Defined in -[LoginButton.tsx:23](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/LoginButton.tsx#L23) +[LoginButton.tsx:23](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/LoginButton.tsx#L23) ___ @@ -69,4 +69,4 @@ https://core.telegram.org/widgets/login #### Defined in -[createScript.ts:11](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/createScript.ts#L11) +[createScript.ts:11](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/createScript.ts#L11) diff --git a/packages/react/docs/interfaces/CreateScriptOptions.md b/packages/react/docs/interfaces/CreateScriptOptions.md index 47dc1c1..a4c6929 100644 --- a/packages/react/docs/interfaces/CreateScriptOptions.md +++ b/packages/react/docs/interfaces/CreateScriptOptions.md @@ -38,7 +38,7 @@ The username of the bot that will be used to authenticate the user. #### Defined in -[types.ts:25](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L25) +[types.ts:25](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L25) ___ @@ -54,7 +54,7 @@ The URL where the auth data from Telegram will be sent. #### Defined in -[types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L20) +[types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L20) ___ @@ -76,7 +76,7 @@ The size of the button. #### Defined in -[types.ts:32](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L32) +[types.ts:32](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L32) ___ @@ -92,7 +92,7 @@ The radius of the button corners. #### Defined in -[types.ts:37](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L37) +[types.ts:37](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L37) ___ @@ -114,7 +114,7 @@ The language of the button. #### Defined in -[types.ts:44](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L44) +[types.ts:44](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L44) ___ @@ -144,7 +144,7 @@ The callback function that will be called when the user is authenticated. #### Defined in -[types.ts:49](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L49) +[types.ts:49](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L49) ___ @@ -166,7 +166,7 @@ The access level that the bot will request. #### Defined in -[types.ts:56](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L56) +[types.ts:56](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L56) ___ @@ -188,7 +188,7 @@ true #### Defined in -[types.ts:63](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L63) +[types.ts:63](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L63) ___ @@ -204,4 +204,4 @@ The version of the Telegram widget to deal with browser caching. #### Defined in -[types.ts:68](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L68) +[types.ts:68](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L68) diff --git a/packages/react/docs/interfaces/LoginButtonProps.md b/packages/react/docs/interfaces/LoginButtonProps.md index 8e409ce..38e434e 100644 --- a/packages/react/docs/interfaces/LoginButtonProps.md +++ b/packages/react/docs/interfaces/LoginButtonProps.md @@ -32,7 +32,7 @@ The username of the bot that will be used to authenticate the user. #### Defined in -[types.ts:25](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L25) +[types.ts:25](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L25) ___ @@ -44,7 +44,7 @@ The URL where the auth data from Telegram will be sent. #### Defined in -[types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L20) +[types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L20) ___ @@ -62,7 +62,7 @@ The size of the button. #### Defined in -[types.ts:32](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L32) +[types.ts:32](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L32) ___ @@ -74,7 +74,7 @@ The radius of the button corners. #### Defined in -[types.ts:37](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L37) +[types.ts:37](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L37) ___ @@ -92,7 +92,7 @@ The language of the button. #### Defined in -[types.ts:44](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L44) +[types.ts:44](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L44) ___ @@ -118,7 +118,7 @@ The callback function that will be called when the user is authenticated. #### Defined in -[types.ts:49](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L49) +[types.ts:49](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L49) ___ @@ -136,7 +136,7 @@ The access level that the bot will request. #### Defined in -[types.ts:56](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L56) +[types.ts:56](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L56) ___ @@ -154,7 +154,7 @@ true #### Defined in -[types.ts:63](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L63) +[types.ts:63](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L63) ___ @@ -166,4 +166,4 @@ The version of the Telegram widget to deal with browser caching. #### Defined in -[types.ts:68](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L68) +[types.ts:68](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L68) diff --git a/packages/react/docs/interfaces/TelegramAuthData.md b/packages/react/docs/interfaces/TelegramAuthData.md index 8118334..b1d9e26 100644 --- a/packages/react/docs/interfaces/TelegramAuthData.md +++ b/packages/react/docs/interfaces/TelegramAuthData.md @@ -28,7 +28,7 @@ https://core.telegram.org/widgets/login#receiving-authorization-data #### Defined in -[types.ts:7](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L7) +[types.ts:7](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L7) ___ @@ -38,7 +38,7 @@ ___ #### Defined in -[types.ts:8](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L8) +[types.ts:8](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L8) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[types.ts:9](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L9) +[types.ts:9](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L9) ___ @@ -58,7 +58,7 @@ ___ #### Defined in -[types.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L10) +[types.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L10) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[types.ts:11](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L11) +[types.ts:11](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L11) ___ @@ -78,7 +78,7 @@ ___ #### Defined in -[types.ts:12](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L12) +[types.ts:12](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L12) ___ @@ -88,4 +88,4 @@ ___ #### Defined in -[types.ts:13](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/react/src/types.ts#L13) +[types.ts:13](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/react/src/types.ts#L13) diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md index 2050f41..3295a04 100644 --- a/packages/server/CHANGELOG.md +++ b/packages/server/CHANGELOG.md @@ -1,5 +1,11 @@ # @telegram-auth/server Change Log +## 1.0.4 + +### Patch Changes + +- [#25](https://github.com/manzoorwanijk/telegram-auth/pull/25) [`e5e86d3`](https://github.com/manzoorwanijk/telegram-auth/commit/e5e86d356e15c3a7d74939889c5228ea2c330b04) Thanks [@manzoorwanijk](https://github.com/manzoorwanijk)! - Fixed web app detection + ## 1.0.3 ### Patch Changes diff --git a/packages/server/docs/README.md b/packages/server/docs/README.md index 4b7923b..56fe161 100644 --- a/packages/server/docs/README.md +++ b/packages/server/docs/README.md @@ -34,7 +34,7 @@ Shape of the data to be passed AuthDataValidator.validate(). #### Defined in -[utils/types.ts:4](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L4) +[utils/types.ts:4](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L4) ## Functions @@ -58,7 +58,7 @@ A Uint8Array of the hexString. #### Defined in -[utils/hexStringToArrayBuffer.ts:7](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/hexStringToArrayBuffer.ts#L7) +[utils/hexStringToArrayBuffer.ts:7](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/hexStringToArrayBuffer.ts#L7) ___ @@ -83,7 +83,7 @@ A new Map object with the entries from the searchParams object. #### Defined in -[utils/searchParamsToAuthDataMap.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/searchParamsToAuthDataMap.ts#L10) +[utils/searchParamsToAuthDataMap.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/searchParamsToAuthDataMap.ts#L10) ___ @@ -107,7 +107,7 @@ A new Map object with the entries of the object passed in. #### Defined in -[utils/objectToAuthDataMap.ts:9](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/objectToAuthDataMap.ts#L9) +[utils/objectToAuthDataMap.ts:9](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/objectToAuthDataMap.ts#L9) ___ @@ -132,4 +132,4 @@ A Map object with the key/value pairs from the URL's query string. #### Defined in -[utils/urlStrToAuthDataMap.ts:8](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/urlStrToAuthDataMap.ts#L8) +[utils/urlStrToAuthDataMap.ts:8](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/urlStrToAuthDataMap.ts#L8) diff --git a/packages/server/docs/classes/AuthDataValidator.md b/packages/server/docs/classes/AuthDataValidator.md index 5eae629..9b2aa27 100644 --- a/packages/server/docs/classes/AuthDataValidator.md +++ b/packages/server/docs/classes/AuthDataValidator.md @@ -37,7 +37,7 @@ https://core.telegram.org/widgets/login#checking-authorization #### Defined in -[AuthDataValidator.ts:55](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L55) +[AuthDataValidator.ts:55](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L55) ## Methods @@ -59,7 +59,7 @@ Sets the bot token to be used for validating the data #### Defined in -[AuthDataValidator.ts:96](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L96) +[AuthDataValidator.ts:96](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L96) ___ @@ -81,7 +81,7 @@ Sets the crypto to be used for validating the data #### Defined in -[AuthDataValidator.ts:107](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L107) +[AuthDataValidator.ts:107](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L107) ___ @@ -103,7 +103,7 @@ Sets the encoder to be used for encoding the data #### Defined in -[AuthDataValidator.ts:118](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L118) +[AuthDataValidator.ts:118](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L118) ___ @@ -126,7 +126,7 @@ which is the number of seconds after which the data is considered invalid. #### Defined in -[AuthDataValidator.ts:131](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L131) +[AuthDataValidator.ts:131](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L131) ___ @@ -148,7 +148,7 @@ This function sets the throwIfEmptyData property of the class. #### Defined in -[AuthDataValidator.ts:142](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L142) +[AuthDataValidator.ts:142](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L142) ___ @@ -182,4 +182,4 @@ https://core.telegram.org/widgets/login#checking-authorization #### Defined in -[AuthDataValidator.ts:156](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L156) +[AuthDataValidator.ts:156](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L156) diff --git a/packages/server/docs/interfaces/AuthDataValidatorOptions.md b/packages/server/docs/interfaces/AuthDataValidatorOptions.md index d6f8b4e..7fffa6e 100644 --- a/packages/server/docs/interfaces/AuthDataValidatorOptions.md +++ b/packages/server/docs/interfaces/AuthDataValidatorOptions.md @@ -24,7 +24,7 @@ If you don't pass this here, you'll need to set it later using `setBotToken()`. #### Defined in -[AuthDataValidator.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L10) +[AuthDataValidator.ts:10](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L10) ___ @@ -40,7 +40,7 @@ https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto #### Defined in -[AuthDataValidator.ts:17](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L17) +[AuthDataValidator.ts:17](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L17) ___ @@ -52,7 +52,7 @@ The encoder to be used for encoding the data #### Defined in -[AuthDataValidator.ts:22](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L22) +[AuthDataValidator.ts:22](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L22) ___ @@ -70,7 +70,7 @@ The time in seconds after which the data should be considered invalid #### Defined in -[AuthDataValidator.ts:29](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L29) +[AuthDataValidator.ts:29](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L29) ___ @@ -88,4 +88,4 @@ true #### Defined in -[AuthDataValidator.ts:36](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/AuthDataValidator.ts#L36) +[AuthDataValidator.ts:36](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/AuthDataValidator.ts#L36) diff --git a/packages/server/docs/interfaces/TelegramUserData.md b/packages/server/docs/interfaces/TelegramUserData.md index 75ef85b..3e624a3 100644 --- a/packages/server/docs/interfaces/TelegramUserData.md +++ b/packages/server/docs/interfaces/TelegramUserData.md @@ -29,7 +29,7 @@ https://core.telegram.org/widgets/login#receiving-authorization-data #### Defined in -[utils/types.ts:12](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L12) +[utils/types.ts:12](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L12) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[utils/types.ts:13](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L13) +[utils/types.ts:13](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L13) ___ @@ -49,7 +49,7 @@ ___ #### Defined in -[utils/types.ts:14](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L14) +[utils/types.ts:14](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L14) ___ @@ -59,7 +59,7 @@ ___ #### Defined in -[utils/types.ts:15](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L15) +[utils/types.ts:15](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L15) ___ @@ -69,7 +69,7 @@ ___ #### Defined in -[utils/types.ts:16](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L16) +[utils/types.ts:16](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L16) ___ @@ -79,7 +79,7 @@ ___ #### Defined in -[utils/types.ts:18](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L18) +[utils/types.ts:18](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L18) ___ @@ -89,7 +89,7 @@ ___ #### Defined in -[utils/types.ts:19](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L19) +[utils/types.ts:19](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L19) ___ @@ -99,4 +99,4 @@ ___ #### Defined in -[utils/types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/0444dc6/packages/server/src/utils/types.ts#L20) +[utils/types.ts:20](https://github.com/manzoorwanijk/telegram-auth/blob/e5e86d3/packages/server/src/utils/types.ts#L20) diff --git a/packages/server/package.json b/packages/server/package.json index bb07757..bae471e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@telegram-auth/server", - "version": "1.0.3", + "version": "1.0.4", "description": "Zero dependency package to validate data received from Telegram Login Widget", "keywords": [ "telegram",