Commit Graph

24 Commits

Author SHA1 Message Date
RaviAnand Mohabir
ade22e00f1 🎨 Remove unused Imports 2022-02-23 14:52:43 +01:00
Landon Noss
6547a2e78f
Update Svelte-kit dependency to @next.259 (#69)
* updating svelte-kit types to 259 and patching RequestHandler for RequestEvent

* adding dist for github distribution

* cookie parsing from RequestEvent

* reverting gitignore change

* removing dist folder as test artifact

* adding npm prepare

* pattching a default to https redirects
2022-02-23 11:25:59 +01:00
Dan6erbond
ac77764b3d
[FIX] Fix Client Functions and Add Base Path Option (#63)
Fixes #54.
2022-01-12 20:28:20 +01:00
Dan6erbond
099dfd294f
Merge pull request #62 from Dan6erbond:issues/45
[FEATURE] Add Support to Specify Protocol in Auth Config
2022-01-12 19:56:42 +01:00
RaviAnand Mohabir
aea2f9d16e Add option to specify host in Auth config 2022-01-12 19:53:53 +01:00
RaviAnand Mohabir
c10199ab40 🏷️ Add error type to CallbackResult 2022-01-12 19:28:02 +01:00
Alexander Staroselsky
962064eb48
feat: spotify provider (#60)
* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* feat: add spotify oauth2 provider

* 🔧 Add `README.md` to `.prettierignore`

* 🎨 Update Prettier and ESLint + format codebase

* 💚 Use `--frozen-lockfile` flag in `yarn install` GitHub CI

* 🔧 Ignore app dir in ESLint script

* 🔧 Move ESLint ignore instructions to `.eslintignore` file

* 🔧 Fix various glob patterns to properly ignore dirs

* 🎨 Run Prettier

Co-authored-by: Alexander Staroselsky <Alexander.Staroselsky1@T-Mobile.com>
Co-authored-by: Dan6erbond <moravrav@gmail.com>
2022-01-12 19:00:35 +01:00
lulzneko
9a5dbe2386
Upgrade to SvelteKit 1.0.0-next.211 and related fixes (#58)
*  Upgrade to SvelteKit 1.0.0-next.211 and related fixes

* 🚨 Fix some lint / formatter errors, ESLint plugin Svelte3 still not working

Co-authored-by: RaviAnand Mohabir <moravrav@gmail.com>
2022-01-12 17:04:51 +01:00
David Bottiau
7c3d02ea0a
add github provider (#50) 2022-01-12 16:43:53 +01:00
RaviAnand Mohabir
5e674c30ee 🎨 Lint and prettify twitch.ts 2021-05-26 00:01:27 +02:00
!anime.x_ror
615ff5fee3
added twitch provider (#22) 2021-05-25 23:59:38 +02:00
Dan6erbond
923c66df58 🏷️ Update Facebook generic typing for custom profile types 2021-05-25 14:32:06 +02:00
Dan6erbond
35f9525363 🏷️ Remove tokens argument from redditProfileHandler 2021-05-25 10:12:13 +02:00
Dan6erbond
d64d9f1807 🏷️ Make OAuth2ProviderConfig.scope and params optional for better type inference in client applications 2021-05-25 10:06:34 +02:00
Dan6erbond
293aec5320 🏷️ Fix Facebook types
Remove tokens type generic
2021-05-25 09:56:56 +02:00
RaviAnand Mohabir
1880e08c42 🏷️ Fix Google and Twitter provider types 2021-05-24 21:14:55 +02:00
Dan6erbond
47cf0f1250
[ENHANCEMENT] Enhanced Types, Improved OAuth2 Configuration and Bug Fixes (#16)
* 🐛 Refactor `getPath` to `getUrl` and add `getPath` to fix detection of routes

* 🐛 Dynamically build `RegExp` with `basePath`

*  Add `ucFirst` helper

*  Add profile and tokens typing, add `contentType` to config for token fetch and use config in `RedditOAuth2Provider` instead of `getToken` override

* ✏️ Update imports in demo app
2021-05-24 16:30:17 +02:00
RaviAnand Mohabir
35f48c0cb5 🎨 Format and lint code 2021-05-23 22:30:34 +02:00
Dan6erbond
b4f7688377
[ENHANCEMENT] OAuth Base Provider (#12)
*  Inject auth instance into provider `signin()` and `callback()` methods

Add generic OAuth provider to implement with simple config.

* 🐛 Fix storing multiple social connections in demo app

*  Create `apiKey` and `apiSecret` aliases for Reddit provider

* ⬆️ Reinstall local dep

* 🏷️ Remove comments / use `OAuth2ProviderConfig` for `GoogleOAuth2Provider` types
2021-05-23 22:09:57 +02:00
Dan6erbond
591bfbbbc6
[ENHANCEMENT] Distributable Bundle with Rollup and ESBuild (#11)
* ⚰️ Remove `package-lock.json` to avoid conflicts with Yarn

* ⚰️ Remove `jwt.ts`

* 🏗️ Setup Rollup with entry module `package.json` files and use named exports exclusively for compatibility with CommonJS

* ⬆️ Use `file:..` instead of `link:..` in demo app to test local installation

* 🏷️ Export types as individual files to avoid protected access errors

* 🚨 Explicit `export types`

* 💚 Use ESBuild to bundle with Rollup, update Rollup deps and types

* 🐛 Remove usage of SvelteKit modules

Disable implicitly updating session, routing and getting redirect URL from SvelteKit modules due to missing exports.
2021-05-23 17:32:42 +02:00
Dan6erbond
5d1802fea4
[ENHANCEMENT] Demo / Testing App, Updated Build Configuration (#8)
* 🎉 Scaffold example app with SvelteKit barebones skeleton

* 💄 Add TWCSS and base styles with fonts Inter/Fira Mono

* 🔧 Add `exports` and `types` to `package.json` and update `tsconfig.json` for Vite-compatible build output

*  Add local dependency to `svelte-kit-auth` as symlink

* 🔧 Update example app env variables

*  Add basic auth config to example app

* ♻️ Export all providers from `/providers` module

* 🎨 Make `Auth` class default export of lib

* 🚚 Rename `example-app` to `app`

*  Use `file:` instead of `link:` for local dependency to `svelte-kit-auth`

* 🔧 Add `JWT_SECRET_KEY` to env and config

* 🎨 Add `RedditOAuthProvider.profileHandler` for general use and stripping of payload

*  Export auth API routes from app

* ⬆️ Update local deps

*  Add `host` and `basePath` to general config and improve recognition of routes

* 🚨 Exclude `app` from TS build

* 📌 Undo `file:` mapping dependency for usage with Vite

TODO: Needs to be fixed for release.

* 🎨 Enable TS `strict` mode and set target to `es2017`

* 📌 Undo `file:` mapping dependency for usage with Vite

* 🚨 Format and lint files

* 🍱 Add logo

*  Add login and profile routes to example app for showcase and testing

* 💄 Add PrismJS and create homepage with example

* 🔨 Add `build:watch`
2021-05-21 17:59:21 +02:00
RaviAnand Mohabir
2b21911d22 🏷️ Export types from index.ts 2021-05-17 19:12:58 +02:00
RaviAnand Mohabir
8de1f5cc42 🚚 Move lib to root src/ folder 2021-05-17 19:10:41 +02:00
RaviAnand Mohabir
d7c4438f43 Import codebase from Cheeri-No 2021-05-17 18:47:55 +02:00