Skip to content

Consider implementing login and logout functionality #171

@artur-intech

Description

@artur-intech

After having read project description - in particular the part "This simple gem will help you enable login/logout through [GitHub OAuth]" - I am kind of puzzled to understand whether this gem should handle all that stuff with cookies explained in the readme.

Currently there is too much hassle to start using the gem, in my opinion.

Basically if the gem is really about login and logout, then I would rather incorporate the following (at least) right into it:

get '/github-callback' do
  cookies[:glogin] = GLogin::Cookie::Open.new(
    settings.glogin.user(params[:code]),
    # The same encryption secret that we were using above:
    secret
  ).to_s
  redirect to('/')
end


get '/logout' do
  cookies.delete(:glogin)
  redirect to('/')
end

On the other hand, if it only concerns login with Github, then I wonder whether we need to deal with logging out at all, since it has nothing to do with Github.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions