问题
I am implementing outlook signup/signin in my Rails app for authentication from scratch without using Devise or another library or gem. I have followed the official microsoft blog For integrating outlook signin in Rails app But I am failing to implement the final step and it shows->
I have understood the problem , that the storing size of token exceeds the available cookie size
I have successfully done all of the steps just When I try to store the token, it gives error
class AuthController < ApplicationController
include AuthHelper
def gettoken
token = get_token_from_code params[:code]
session[:azure_token] = token.to_hash
redirect_to users_path
end
end
And I have sessions controller for normal email signin->
class SessionsController < ApplicationController
include AuthHelper
def new
@login_url = get_login_url
end
def create
user= User.find_by_email(params[:email])
if user && user.authenticate(params[:password])
if user.email_confirmed
session[:user_id] = user.id
redirect_to root_path, info: "Logged In!"
else
redirect_to new_user_path, flash: { warning: "PLease confirm your email before login !" }
end
else
flash.now[:warning] = "Email or Password invalid !"
render "new"
end
end
def destroy
session[:user_id] = nil
redirect_to root_url, notice: "Logged out!"
end
end
And I am also using normal email signin so How do I integrate both normal email signup/signin AND Outlook signin. Here is the complete code reference in case you need other associated codes-Git code for the app
来源:https://stackoverflow.com/questions/57447558/login-using-outlook-showing-cookie-overflow-error