Skip to content

Instantly share code, notes, and snippets.

View andrewtheskills's full-sized avatar

andrewtheskills

View GitHub Profile
@davideluque
davideluque / !README.MD
Last active February 13, 2024 15:18
Sign in with Apple in Ruby on Rails using apple_id gem.

Sign in with Apple Implementation for Ruby on Rails

Note: Before diving into this implementation, consider that there are more popular and potentially easier-to-use solutions for implementing Sign in with Apple in Ruby on Rails, such as Omniauth. If you prefer a more out-of-the-box approach, explore those alternatives.

Overview

This implementation of the Sign in with Apple service in Ruby on Rails is suitable for APIs, eliminating the need for views.

Features

@jesster2k10
jesster2k10 / README.md
Last active October 29, 2023 07:37
Rails API Social Login

Rails API-Only Social Login

This is another piece of code I've extrapolated from a Ruby on Rails project I'm currently working on. The code implmenets social login with a RoR API-based application, targeted at API clients.

The setup does not involve any browser-redirects or sessions as you would have to use working with Omniauth. Instead, what it does is takes an access_token generated on client-side SDKs, retireves user info from the access token and creates a new user and Identity in the database.

This setup works with native applications as described in the Google iOS Sign In Docs (see Authenticating with a backend server)