Week 5
Week 5 at Strastan
This week was all about chasing down bugs, securing credentials, and finally watching our LinkedIn OAuth2 flow behave like it was supposed to. Between graduation prep buzz and lab sessions, I managed to wrestle the last pieces of the integration into place.
Thoughts
OAuth2 sounds simple until you’re knee-deep in token exchanges, redirect URLs, and CSRF protection. Getting /linkedin/auth
to return a clean 302 felt like a small victory especially after hours of decoding CloudWatch logs and patching handler logic. Once the callback started accepting both GET and POST, parsing the authorization code, and saving tokens to DynamoDB, it finally felt like the system was breathing on its own.
Adding the state parameter was a turning point. Encoding the Cognito ID and nonce, storing it with a TTL, and validating it on callback made the whole flow feel airtight. And pulling user profile data from LinkedIn’s /v2/userinfo
endpoint? That was the cherry on top.
Challenges
- Internal server errors on
/linkedin/auth
were vague and stubborn CloudWatch became my debugging lifeline.
- Secrets Manager integration required IAM tweaks and refactoring to ditch hardcoded credentials.
- Validating the OAuth state and linking everything to Cognito identities took precision and patience.
- Handling both GET and POST responses in the callback Lambda wasn’t as straightforward as expected.
/linkedin/auth
were vague and stubborn CloudWatch became my debugging lifeline.
Comments
Post a Comment