Customize discourse-crowd login screen html

Hi Everyone.

I’m newbe on Discourse, and I must to change something in Login page but I don’t know where is the target and is content.

The URL looks like this: my.domain.com/auth/crowd and I get a Login page but I’m not able to edit its content.
I saw something in the discourse conf file (crowd_custom_html) but the content is not really the same as displayed on the page.
I wonder where I can change this content.

Also, I checked if there were any redirection on /auth/crowd, Nothing (I guess).

Is someone can help me please?

Thanks

Franck

Your discourse is probably using Atlassian Crowd for sso

You should check the crowd documentation for any changes to your login page.

2 Likes

Ok thanks for your help. :slight_smile:

After diging further code, (I’m don’t know Ruby). it looks there something in the code which block the html content.

I imagine it’s the fact to set DISCOURSE_CROWD_CUSTOM_HTML: which will display the content here?

1 Like

Yes that should work - you should configure the DISCOURSE_CROWD_CUSTOM_HTML environment variable inside your app.yml file

Unfortunately it doesn’t work.
Maybe the content must be enclosed with quotes?
For now, the content is not enclosed with quotes.

Oh yes - I just tried it out locally and it looks like we have some issues with parsing GlobalSetting values which contain quote marks (and custom HTML will pretty much always contain quotes). I just pushed this workaround:

If you update your site, it should work much better now. Here’s an example value which now works for me:

DISCOURSE_CROWD_CUSTOM_HTML: "<a href='https://example.com' style='display: block; margin: 0.5em 0; text-align: center'>Sign up for an example.com account!</a><a style='display: block; text-align: center' href='https://example.com/forgot_password'>Forgot Password</a>"

Thanks so much David.
I will update the website tomorrow.
Do that now, it’s not the good time.

Can I update the website through the GUI?

I will let you know.

1 Like

If you’re not changing the value in app.yml, then yes you should be able to upgrade the discourse-crowd plugin via /admin/upgrade. :+1:

The forum will not be stopped?

It will be just the same as any other update - there may be a few seconds/minutes of downtime/slowness while the update runs. Best to wait for a quiet time on your site if possible.

Ok go it.
Thansk for all. I will let you know :slight_smile:

1 Like

@david a quick question please.

I saw there’s crowd_popup_title and crowd_title.

The difference between them is, the first is displayed in a popup, and the second in a full page, right?

The word ‘popup’ is a little out-of-date. We no longer use popups for authentication, so that value is in fact used as the <title> of the tab during authentication:

(i.e. this bit:)
Screenshot 2021-11-30 at 15.50.41

crowd_title is used as the label on the login button (if you have multiple login methods enabled)

If you don’t supply crowd_popup_title, then crowd_title will be used for the <title> of the login tab.

Ha ok.
I say that because, indeed, there’s no popup for login after update. we’ve got a full page for login right now.

BTW, is there a way to customize this page, like for example, background…Etc?

1 Like

Yes you can use DISCOURSE_CROWD_CUSTOM_CSS to add custom CSS rules to the page

1 Like

Good Morning @david

That works.
Thanks so much.

I wish you a nice day. :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.