omniauth

Omniauth “with” STI and devise

三世轮回 提交于 2019-12-21 23:59:58
问题 I'm figured out with no results. I have a model named User and to models with STI fan and artist, like this: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :confirmable, :lockable, :recoverable, :rememberable, :trackable, :validatable, **:omniauthable** end and my others models Class Artist < User end Class Fan < User end my routes devise_for :users devise_for :artists devise_for :fans I have a problem when try to run my server or anything else i got this

Rails 4 Devise/Omniauth Email exists in database error

依然范特西╮ 提交于 2019-12-21 21:50:18
问题 I am "banging" my head against a wall trying to figure this out. I decided to allow users to log in through twitter, Google,my site or Facebook. The problem is that twitter does not provide emails, so I am trying to add users by username. The problem with that is devise keeps checking for email and when I don't require it, I get PG::Error: ERROR: duplicate key value violates unique constraint "index_users_on_email" DETAIL: Key (email)=() already exists. : INSERT INTO "users" ("created_at",

omniauth-devise error: “Validation failed: Email has already been taken”

徘徊边缘 提交于 2019-12-21 05:37:08
问题 I am trying to create a rails 4 app with omniauth devise : signin with facebook signin with google signin with linkedin signin with twitter Here, I am able to login in with either facebook, linkedin, twitter or google account. But my problem is: my google account email and linkedin email address are same. And login with google and then login with linkedin is giving me this error: "Validation failed: Email has already been taken" This is a problem because devise uses :unique => true in

Rails 3 getting gmail contacts using omniauth?

让人想犯罪 __ 提交于 2019-12-21 04:45:06
问题 I am successfully login with google credentials using omniauth? omniauth is providing uid as following link https://www.google.com/accounts/o8/id?id=xxxxxxxxxx by using the above link is possible to get gmail contacts or their any other way to get gmail contact 回答1: No, Omniauth just provides authentication. There is a gem that might be interesting for you: https://github.com/cardmagic/contacts Quote: "Contacts is a universal interface to grab contact list information from various providers

generate unique username (omniauth + devise)

ぐ巨炮叔叔 提交于 2019-12-21 02:47:29
问题 I have an app with user authentication with devise + omniauth. In my model that username in my app is unique . I dont want duplicate username in my app. Some users in facebook has not a defined username in his profile. I want generate an unique username if the user has not username defined in facebook. For example for generate password I have this: :password => Devise.friendly_token[0,20] How can I generate a unique username for my app if the facebook user has not username in facebook? Thank

Rails authentication strategy for noob

a 夏天 提交于 2019-12-21 01:57:19
问题 Hope this is not too broad but after a lot of googling I am not sure where to start. I am looking for a introductory/noob overview to help me get started on building an authentication implementation for a rails 3 application. Basic technical requirements: Rails 3 application is hosted on third party service (heroku) Need to use specific external private SSO service to authenticate users. No local user database or model in the rails application. Authentication is token based meaning that there

How to use and configure omniauth with yahoo, google, facebook strategies in various environments?

淺唱寂寞╮ 提交于 2019-12-20 16:47:31
问题 I'm working on a Rails 3.2 application that will allow users to authenticate with multiple providers ... Yahoo, Google, Facebook and/or Twitter. We are using omniauth, and while I understand the basic workflow, I cannot find an inclusive document that states how each of these specific providers should be configured nor how a Rails application should be set up so that I can properly test/use these strategies in development, test and production environments. So my questions: For each of these

Create named routes for OmniAuth in Rails 3

故事扮演 提交于 2019-12-20 12:32:22
问题 After having watched Ryan's excellent Railcast Simple OmniAuth, I've managed to implement authentication in my app. Everything is working fine, but in my view I have links that look like this: <%= link_to 'Sign in with Twitter', '/signin/twitter' %> <%= link_to 'Sign in with Facebook', '/signin/facebook' %> I was wondering if there is an elegant way to create a named route to replace that with: <%= link_to 'Sign in with Twitter', signin_twitter_path %> <%= link_to 'Sign in with Facebook',

OmniAuth::NoSessionError - You must provide a session to use OmniAuth. (configured in devise)

喜夏-厌秋 提交于 2019-12-20 12:26:58
问题 Hi I am learning how to use omniauth as backend for ember app. when i run my application I get the below mentioned erroe OmniAuth::NoSessionError - You must provide a session to use OmniAuth on resue rails s my applicataion halts at line below. 172: def call!(env) # rubocop:disable CyclomaticComplexity 173: unless env['rack.session'] 174: error = OmniAuth::NoSessionError.new('You must provide a session to use OmniAuth.') => 175: fail(error) 176: end 177: config/intializer/devise Devise.setup

Use separate authentication model with Devise on Rails

时光毁灭记忆、已成空白 提交于 2019-12-20 10:37:42
问题 I have a simple solution I've made myself with the following objects: Account (has token field, that is returned when authenticating and used in API calls) Authentication (has auth_type/auth_id and reference to Account) I have a separate Authentication model to be able to connect several ways of login (device UUID, email/password, twitter, facebook etc). But it seems that in all examples of Devise you use it on the User ( Account ) model. Isn't that less flexible? For example OmniAuth module