Giter VIP home page Giter VIP logo

camaleon_oauth's Introduction

CamaleonOauth

This is a Camaleon CMS gem to support oauth integration for Camaleon CMS.

camaleon_oauth's People

Contributors

raulanatol avatar owen2345 avatar p avatar

Stargazers

Aurel Branzeanu avatar Wenderson Fernandes avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

camaleon_oauth's Issues

include CamaleonCms::SessionHelper in global scope is unhealthy

This:

https://github.com/owen2345/camaleon_oauth/blob/master/config/initializers/doorkeeper.rb#L1

makes methods like current_user available in the global scope.

However, current_user invokes cama_calc_api_current_user which invokes doorkeeper_token. doorkeeper_token is not available in the global scope, hence current_user fails.

Furthermore, cama_current_user has a cache for the current user value - @cama_current_user. This is an instance variable which again is not accessible from the global scope.

Instead of putting methods into the global scope, specific classes or modules should include CamaleonCms::SessionHelper etc.

How do I use this?

I installed this gem and ran rails db:migrate, and I enabled the plugin in /admin/plugins. However, the /admin/register screen is the same as before (no oauth options). Additionally, the documentation link in /admin/plugins doesn't work. Are there additional steps to install?

Rails 5.1.4
Ruby 2.4.2
Camaleon git version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.