Nice looking solution….
— OmniAuth: Flexible, Unassuming Multi-Provider Authentication for Rack - Intridea Blog