
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Seamlessly jump to a separate domain for HTTPS login and then back.
The below information is a work in progress. Don't use this yet; it isn't ready.
OK, here's how this works. First, obviously, you add cheapskate to your Gemfile:
gem 'cheapskate'
The gem provides its own Rails engine, which adds the following to your app:
POST /login
GET /logged_in
POST /register
GET /registered
SingleUseLogin
SingleUseNotice
Both the /logged_in and /registered routes redirect back to Cheapskate::CONFIG['ROOT_PATH']
,
which defaults to "/"
.
Internally much of the logic where the gem hooks into your application is found in the
Cheapskate::Client
module. You can include this module and override any of these methods if you
want:
create_user(params)
- will create user from params[:user]
with keys :name
and :email
(and
password w/ confirmation) by defaultfind_user(params)
- will look up user by params[:email]
by defaultauthenticate_user(user, params)
user_name(user)
store_user_in_session(user, session)
- will set session[:user_id] = user.id
by defaultalert_notice(controller, message)
- uses flash[:notice]
by defaultalert_error(controller, message)
- uses flash[:notice]
by defaultIf you implement your own client (by defining a class that includes Cheapskate::Client
),
Cheapskate will automatically use your implementation.
FAQs
Unknown package
We found that cheapskate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.