Skip to content

Users can sign in with Github OAuth on Android#10

Open
kcdragon wants to merge 3 commits intorubyevents:mainfrom
kcdragon:md-oauth
Open

Users can sign in with Github OAuth on Android#10
kcdragon wants to merge 3 commits intorubyevents:mainfrom
kcdragon:md-oauth

Conversation

@kcdragon
Copy link
Copy Markdown

@kcdragon kcdragon commented May 2, 2026

Description

This PR adds support for authenticating users with Github on the Android native app.

This PR should be reviewed in tandem with this Rails PR.

Authentication process:

  1. User clicks Sign In button
  2. Stimulus Bridge component intercepts the click event
  3. Stimulus Bridge component sends a "signIn" message to the Native Bridge component with the OAuth authorization URL.
  4. Native Bridge component launches the system browser and visits the start URL.
  5. The start page auto submits a form that POSTs the authorization URL which redirects the user to the OAuth provider
  6. User fills in their credentials in the OAuth provider
  7. OAuth provider calls the callback endpoint within the system browser
  8. The Rails app redirects back into the Native app with the "rubyevents" custom schema and a signed token corresponding to the user
  9. The Native app "replies" to the Stimulus Bridge component with the signed token
  10. The Stimulus Bridge component uses Turbo to visit the "exchange" URL with the signed token and this signs in the user within the web view

Screenshots

Screen.Recording.2026-05-04.at.6.13.27.PM.mov

Testing Steps

  1. Add Github OAuth credentials to .env file
  2. Route traffic to local Rails app through Ngrok
  3. Update the Android app to use your Ngrok URL
  4. Update the Github OAuth app to use your Ngrok URL for callbacks
  5. Start the Android app
  6. Navigate to the Sign In tab
  7. Click on Sign in with Github
  8. Fill in Github credentials
  9. You should be redirected back into the app and authenticated

References

@kcdragon kcdragon changed the title Users can sign in with oauth Users can sign in with OAuth on Android May 2, 2026
@kcdragon kcdragon changed the title Users can sign in with OAuth on Android Users can sign in with Github OAuth on Android May 2, 2026
@kcdragon kcdragon marked this pull request as ready for review May 4, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sign in to RubyEvents

1 participant