Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:55:53+00:00 2026-06-11T07:55:53+00:00

I am completely stuck on where to start with getting a log-in area for

  • 0

I am completely stuck on where to start with getting a log-in area for a Clojure site I am building (for fun).

I’ve looked at several resources, which I’ll post below, mercilessly copy/pasted code, and the closest I can get is one of two situations:

The login page takes the login but says that the login failed, though, as far as I can tell, the login matches.

Or I get this error: No method in multimethod ‘->sql’ for dispatch value: null

I’m not sure how to interpret the above error: is this specifying that I need a multi-method or is it specifying that I need to check for null? The null requirement makes no sense at all. I’m not really asking but if anyone wants to give an explanation, that is great.

I tested the output by comparing the results-to-select queries from raw non-hashed data, I’ve went through 5 variations on this theme, using everything from page-to-page calls to creating new defpartials, multi-methods, defn, etc.

Sources I have used (unfortunately, I can’t list all of them being a first-time poster):

This one uses Clojure -> Korma -> PostgreSQL, but the code doesn’t seem to work for multiple users?
http://www.vijaykiran.com/2012/01/17/web-application-development-with-clojure-part-2/

This one shows how to use Noir and PostgreSQL (Yes, I am using Noir):
https://yogthos.net:11794/blog/23-Noir+tutorial+-+part+2

The 4Clojure site, but that one uses CongoMongo:

The Heroku Twitter clone, but no mention of how to create logins for one person, much less several.

I also bought Programming Clojure from O’Reilly Press, but once again, nothing about how to create a log-in area.

FIRST EDIT: I was asked to create a github repository of a stand-alone site. This includes a working “Account Creation” area that is found in the welcome.clj file and only a form of the Login area in login.clj.

I was attempting to get some of the same errors working as I had last night and also attempting to get this working before I uploaded the files. I don’t have any reasonable starting points yet, thus there is no beginning implementation as of yet. I’m seriously embarrassed at the solutions I’ve been coming up with, thus I don’t want to post them. I get conceptually what I should do, but for some reason, I can’t seem to translate this. This is my first github account: my background is Python, Scheme a’la SICP, and some Python + PostgreSQL marketing program I built.

SECOND EDIT: Ack! I can’t seem to get the thing to work at all… Yeah, I spent well over 20 minutes (hours) on this one, so I have just have to admit that I don’t yet have the requisite knowledge to accomplish this, no matter how many sources I look to. I committed the updated files and all the odd things I tried, including all the variations on login box to running raw SQL. The closest I can come is getting it so that I don’t get any errors, but no evidence at all that someone is logged in. Thanks so much for the help and suggestions. I’ll most certainly return to this later.

https://github.com/dt1/noirKormaLogin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:55:55+00:00Added an answer on June 11, 2026 at 7:55 am

    There are a couple of issues that I see. First, in datapass.clj, you’re creating an entity with no content. I’m not sure how Korma handles that. It’s trying to thread results as inputs to other functions, so I could see how nil gets introduced there.

    Secondly, you’ll need something to handle the login post. (defpage ...) only handles GET requests by default. You’ll need a separate defpage to handle the post. Something along these lines:

    (defpage [:post "/login"] {:keys [user-name pwd]}
      (if-let [user (db/find-user user)]
        (if (noir.util.crypt/compare pwd (:password user))
           (do
             (noir.session/put! :some-key some-value)
             (noir.response/redirect "/success"))
           noir.response/redirect "/failed-to-login"))
      (noir.response/redirect "/failed-to-login"))
    

    session/put! is how you put data into the session. The default is to use an in-memory store. You’ll need to add Ring middleware to use persistent sessions (look at Session Stores).

    Also, as luck would have, someone just posted an authentication app for Noir… you may want to take a look: https://github.com/xavi/noir-auth-app

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am completely stuck with this: I start out with a flat file type
I’ve completely stuck with camera in ray tracing. Please, take a look at my
I'm completely stuck and need your help... I've created a webservice stub with jaxb
I'm completely stuck with calling a method from a UIView subclass, the method just
So I haven't been doing this for long but I'm completely stuck on this.
I feel like this should be really really simple, but I'm completely stuck! In
Which of the following code is better in building a delete -action for removing
I'm trying to use HibernateDaoSupport but I'm getting stuck with a org.hibernate.LazyInitializationException problem. This
Okay, The post was getting way too long and contained way too much self
OK, I'm completely stuck. I want to run Tomcat in embedded mode so I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.