Smart Grill Authentication Platform
Backend engineer building a central authentication server integrating Okta identity management, Shopify e-commerce SSO, and IoT device pairing for smart outdoor cooking products.
Consumer products company manufacturing smart outdoor cooking equipment including connected grills and smokers with mobile app control.
Project Overview
Built a central authentication server that unifies identity management across mobile apps, e-commerce, and IoT devices for a smart outdoor cooking product line. The platform integrates Okta for enterprise-grade identity management, Shopify for e-commerce single sign-on, and custom APIs for pairing smart grills and smokers to user accounts.
The Product
The authentication platform serves as the identity backbone for a connected outdoor cooking ecosystem:
- Mobile App Authentication: Users log in via Okta to control their smart grills remotely
- E-Commerce SSO: Seamless login to the Shopify store using existing credentials
- Device Pairing: Link smart grills and smokers to user accounts for remote monitoring
- Account Management: Registration, password reset, and profile updates
Technical Architecture
Backend (Express.js)
RESTful API server with comprehensive authentication:
- Framework: Express.js with body-parser and CORS
- Authentication: Passport.js with JWT and local strategies
- Identity Provider: Okta OAuth 2.0 integration
- E-Commerce: Shopify Multipass for SSO
- Database: PostgreSQL with Sequelize ORM
- Security: pgcrypto for encrypted token storage
- Email: SendGrid for transactional emails
- Documentation: Swagger UI for API exploration
- Monitoring: Sentry for error tracking
Deployment
AWS-based infrastructure:
- Hosting: AWS Elastic Beanstalk
- CI/CD: Bitbucket Pipelines
- Database: Amazon RDS PostgreSQL
Key Contributions
Okta OAuth 2.0 Integration
Implemented comprehensive identity management with Okta:
- Built Resource Owner Password Flow for mobile app authentication
- Developed user info retrieval using OAuth access tokens
- Created user registration API with Okta profile creation
- Implemented user lookup and profile update endpoints
- Built password update functionality through Okta API
- Handled OAuth token refresh and expiration
Shopify Multipass SSO
Created seamless e-commerce authentication:
- Integrated Shopify Multipass library for token generation
- Built user profile mapping from Okta to Shopify customer format
- Implemented SSO URL generation for redirect-based login
- Handled address synchronization between identity provider and e-commerce
IoT Device Pairing API
Developed device management for smart grills:
- Built CRUD endpoints for paired devices
- Implemented user-scoped device ownership
- Created device registration flow for new products
- Developed JWT-protected device management endpoints
- Built device listing and filtering by user
Secure Token Storage
Implemented encrypted credential handling:
- Configured PostgreSQL pgcrypto extension for encryption
- Built symmetric encryption using PGP_SYM_ENCRYPT/DECRYPT
- Created environment-based encryption key management
- Implemented optional encryption toggle for development
Authentication Flows
Built complete authentication lifecycle:
- Login endpoint with JWT token generation
- Password reset flow with email verification
- User registration with profile creation
- Token refresh handling
- Session management with Passport.js
API Endpoints
Authentication
POST /api/v1/auth/login- Authenticate user and return JWTPOST /api/v1/auth/password-reset- Send password reset emailPOST /api/v1/auth/password-reset/:token- Reset password with token
Users
POST /api/v1/user- Create new user accountGET /api/v1/user- Get current user profilePUT /api/v1/user- Update user profilePUT /api/v1/user/password- Update user password
Paired Devices
POST /api/v1/paired-device- Pair new device to accountGET /api/v1/paired-device- List user’s paired devicesGET /api/v1/paired-device/:id- Get specific devicePUT /api/v1/paired-device/:id- Update deviceDELETE /api/v1/paired-device/:id- Unpair device
Registered Devices
POST /api/v1/registered-device- Register new deviceGET /api/v1/registered-device- List registered devicesGET /api/v1/registered-device/:id- Get device detailsPUT /api/v1/registered-device/:id- Update registrationDELETE /api/v1/registered-device/:id- Remove registration
Shopify Integration
GET /api/v1/shopify/multipass-url- Generate SSO URL for Shopify
Security Implementation
JWT Authentication
- Token generation with configurable expiration
- Passport JWT strategy for route protection
- Basic auth for client application authentication
Database Encryption
- pgcrypto extension for field-level encryption
- Symmetric encryption with environment-managed keys
- SSL connections to PostgreSQL in production
Password Security
- Okta-managed password policies
- Secure password reset flow with time-limited tokens
- No plaintext password storage
Development Environment
Local Setup
- Docker Compose for PostgreSQL
- Sequelize migrations for schema management
- Environment-based configuration via dotenv
- Swagger UI for API testing
Tooling
- Mocha/Chai for testing
- Prettier for code formatting
- Winston for structured logging
- Nodemon for development reload
Technologies Deep Dive
The technology choices balanced security with integration flexibility:
- Okta provided enterprise-grade identity management without building auth from scratch
- Shopify Multipass enabled seamless SSO without exposing credentials to e-commerce
- pgcrypto added database-level encryption for sensitive tokens
- Passport.js provided flexible authentication middleware
- Sequelize simplified database operations with migrations and models
- Elastic Beanstalk enabled managed deployment with auto-scaling
Technologies
Key Highlights
- Built central authentication server integrating Okta OAuth 2.0 for identity management
- Implemented Shopify Multipass SSO for seamless e-commerce customer authentication
- Developed IoT device pairing API enabling users to link smart grills to their accounts
- Created encrypted token storage using PostgreSQL pgcrypto for secure credential handling
- Deployed to AWS Elastic Beanstalk with Bitbucket Pipelines CI/CD