ds_transmit_auth_provider 0.0.3
ds_transmit_auth_provider: ^0.0.3 copied to clipboard
Transmit Authentication Provider For Dartstream.
Transmit Authentication Demo #
Quick Start #
Run both backend and frontend with a single command:
# Install dependencies first
dart pub get
npm install
# Run the app
npm run dev
Then open http://localhost:4000 in your browser.
What This Demo Does #
This example demonstrates the Transmit authentication provider integration:
- Backend: Dart server using
ds_transmit_auth_providerwith endpoints for login, logout, session management, and token refresh - Frontend: Modern web UI with authentication flows
- Integration: Full authentication cycle testing
Features #
✅ User login with email/password
✅ Session management
✅ Token refresh
✅ Logout functionality
✅ Modern, responsive UI
Testing #
In development mode, any email and password combination will work. The provider uses mock authentication from the Transmit SDK.
API Endpoints #
POST /auth/login- Authenticate userGET /auth/session- Check current sessionPOST /auth/logout- End sessionPOST /auth/refresh- Refresh access tokenGET /health- Health check
Architecture #
example/
├── bin/
│ └── transmit_server.dart # Backend server
├── client/
│ ├── index.html # Frontend UI
│ ├── styles.css # Styling
│ └── app.js # Client logic
├── pubspec.yaml # Dart dependencies
└── package.json # npm scripts
Manual Testing #
- Start the server:
dart run bin/transmit_server.dart - Open http://localhost:4000
- Enter any email and password
- Click "Sign In"
- Test token refresh and logout
Next Steps #
- Configure real Transmit API credentials in production
- Add error handling for network failures
- Implement secure token storage
- Add user registration flow