@absolutejs/auth 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +9 -0
- package/README.md +3 -3
- package/dist/index.js +2026 -1
- package/dist/src/authorize.d.ts +34 -3
- package/dist/src/callback.d.ts +4 -4
- package/dist/src/index.d.ts +77 -32
- package/dist/src/profile.d.ts +47 -0
- package/dist/src/protectRoute.d.ts +1 -1
- package/dist/src/refresh.d.ts +11 -8
- package/dist/src/revoke.d.ts +19 -18
- package/dist/src/{logout.d.ts → signout.d.ts} +7 -5
- package/dist/src/status.d.ts +4 -2
- package/dist/src/typeGuards.d.ts +0 -10
- package/dist/src/types.d.ts +37 -27
- package/dist/src/utils.d.ts +1 -1
- package/drizzle.config.ts +12 -0
- package/eslint.config.mjs +245 -0
- package/package.json +21 -6
- package/dist/src/profiles.d.ts +0 -10
- package/dist/src/providers.d.ts +0 -51
- package/src/authorize.ts +0 -119
- package/src/callback.ts +0 -132
- package/src/constants.ts +0 -13
- package/src/index.ts +0 -88
- package/src/logout.ts +0 -39
- package/src/profiles.ts +0 -322
- package/src/protectRoute.ts +0 -33
- package/src/providers.ts +0 -109
- package/src/refresh.ts +0 -63
- package/src/revoke.ts +0 -61
- package/src/sessionStore.ts +0 -10
- package/src/status.ts +0 -100
- package/src/typeGuards.ts +0 -32
- package/src/types.ts +0 -89
- package/src/utils.ts +0 -35
- package/tsconfig.json +0 -17
package/.env.example
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
GOOGLE_CLIENT_ID=xxxxxxx.apps.googleusercontent.com
|
|
2
|
+
GOOGLE_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx
|
|
3
|
+
GOOGLE_REDIRECT_URI=http://localhost:3000/authorize/callback
|
|
4
|
+
|
|
5
|
+
FACEBOOK_CLIENT_ID=xxxxxxxxxxxxxxx
|
|
6
|
+
FACEBOOK_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
7
|
+
FACEBOOK_REDIRECT_URI=http://localhost:3000/authorize/callback
|
|
8
|
+
|
|
9
|
+
DATABASE_URL=postgresql://username:password@host:port/database?sslmode=require
|
package/README.md
CHANGED
|
@@ -47,13 +47,13 @@ Start the example server:
|
|
|
47
47
|
### Configuration Options
|
|
48
48
|
|
|
49
49
|
- **Providers**: Configure multiple authentication providers such as Google, GitHub, and more.
|
|
50
|
-
- **Routes**: Customize the routes for authorization, callback,
|
|
51
|
-
- **Event Handlers**: Define custom event handlers for authorization, callback, status, refresh,
|
|
50
|
+
- **Routes**: Customize the routes for authorization, callback, signout, status, refresh, and revoke.
|
|
51
|
+
- **Event Handlers**: Define custom event handlers for authorization, callback, status, refresh, signout, and revoke events.
|
|
52
52
|
- **User Management**: Implement custom functions for creating and retrieving users.
|
|
53
53
|
|
|
54
54
|
### Example Components and Utilities in the `example` Directory
|
|
55
55
|
|
|
56
|
-
- `components/Example.tsx`: A React component that demonstrates the usage of the authentication system, including login,
|
|
56
|
+
- `components/Example.tsx`: A React component that demonstrates the usage of the authentication system, including login, signout, and protected routes.
|
|
57
57
|
- `components/Navbar.tsx`: A React component that provides a navigation bar with authentication-related links and actions.
|
|
58
58
|
- `server.ts`: The main server file that sets up the example server, handles routes, and integrates the authentication system.
|
|
59
59
|
|