[authentication] Allow easier sharing of URL with identification.php?redirect=... #269

Open
opened 2026-10-04 23:49:55 +02:00 by adam · 15 comments
Owner

Reported by mmoy on 15 Aug 2014 11:15

To invite a user to a particular page visible without authentication, but with more content when authenticated (e.g. an album with both public and private pictures), one can send a link like

http://mmoy.piwigo.com/identification.php?redirect=index?/category/13-selection

that will invite the user to login, and then show the content. There are two drawbacks with this approach:

  • Currently, one has to build the URL by hand. It would be much easier if the "connect" button available on each page was directing to identification.php?redirect=<the current page> instead of argumentless identification.php. Then, a gallery owner could visit the page to share, click "connect" and copy-paste the URL from the browser's location bar (well, not perfect since one would have to log out to get the "connect" button).
  • When identification.php?redirect=<...> is visited by a guest, an error message is displayed "You are not authorized to access the requested page", regardless of whether the content is actually visible or not. It would be better to check whether the page is actually forbidden before showing the error message.
  • One could even go further and allow login= and password= GET parameters, and we would get very close to the "share by URL" feature.

Piwigo Bugtracker #3123

**Reported by mmoy on 15 Aug 2014 11:15** To invite a user to a particular page visible without authentication, but with more content when authenticated (e.g. an album with both public and private pictures), one can send a link like http://mmoy.piwigo.com/identification.php?redirect=index?/category/13-selection that will invite the user to login, and then show the content. There are two drawbacks with this approach: - Currently, one has to build the URL by hand. It would be much easier if the &quot;connect&quot; button available on each page was directing to identification.php?redirect=&lt;the current page&gt; instead of argumentless identification.php. Then, a gallery owner could visit the page to share, click &quot;connect&quot; and copy-paste the URL from the browser&#039;s location bar (well, not perfect since one would have to log out to get the &quot;connect&quot; button). - When identification.php?redirect=&lt;...&gt; is visited by a guest, an error message is displayed &quot;You are not authorized to access the requested page&quot;, regardless of whether the content is actually visible or not. It would be better to check whether the page is actually forbidden before showing the error message. - One could even go further and allow login= and password= GET parameters, and we would get very close to the &quot;share by URL&quot; feature. [Piwigo Bugtracker #3123](http://piwigo.org/bugs/view.php?id=3123) <!-- github-sync-id:97226846 -->
Author
Owner

Comment posted by flop25 on 15 Aug 2014 12:03

?
just link a private page: the user will be redirected to the login page and then after login to page requested. So that already works

**Comment posted by flop25 on 15 Aug 2014 12:03** ? just link a private page: the user will be redirected to the login page and then after login to page requested. So that already works <!-- github-comment-id:124898968 -->
Author
Owner

Comment posted by mmoy on 15 Aug 2014 12:06

Yes, but my point was about pages that are not private, but have more content when authenticated (see the first line of my report).

If I send the link to the page as-is, then people will forget to authenticate and see only the public content.

**Comment posted by mmoy on 15 Aug 2014 12:06** Yes, but my point was about pages that are not private, but have more content when authenticated (see the first line of my report). If I send the link to the page as-is, then people will forget to authenticate and see only the public content. <!-- github-comment-id:124898976 -->
Author
Owner

Comment posted by flop25 on 15 Aug 2014 12:07

oh ok sry I understand much more

**Comment posted by flop25 on 15 Aug 2014 12:07** oh ok sry I understand much more <!-- github-comment-id:124898992 -->
Author
Owner

Comment posted by flop25 on 15 Aug 2014 12:08

You should try the Event Cats plugin, which allows login through a link

**Comment posted by flop25 on 15 Aug 2014 12:08** You should try the Event Cats plugin, which allows login through a link <!-- github-comment-id:124899006 -->
Author
Owner

Comment posted by mmoy on 15 Aug 2014 12:38

Event Cats is not available on piwigo.com, which currently hosts me.

I'm suggesting this only because I think it would be easy to implement, and it would make sense in other flows:

The fact that "connect" forgets the page it's comming from is actually a little annoying anyway. See what Mediawiki does for example, when you click "log in" from any wikipedia page, you get the login page with returnto=<where you came from>, and once you log in, you're back to the page you were visiting.

Doing the same would solve my first point, but it would require the second to be fixed to avoid a spurious error message.

**Comment posted by mmoy on 15 Aug 2014 12:38** Event Cats is not available on piwigo.com, which currently hosts me. I&#039;m suggesting this only because I think it would be easy to implement, and it would make sense in other flows: The fact that &quot;connect&quot; forgets the page it&#039;s comming from is actually a little annoying anyway. See what Mediawiki does for example, when you click &quot;log in&quot; from any wikipedia page, you get the login page with returnto=&lt;where you came from&gt;, and once you log in, you&#039;re back to the page you were visiting. Doing the same would solve my first point, but it would require the second to be fixed to avoid a spurious error message. <!-- github-comment-id:124899024 -->
Author
Owner

@mmoy I have written a new plugin Private Share https://github.com/plegall/Piwigo-private_share that should already do quite the job, would you like to test it on your Piwigo.com account?

@mmoy I have written a new plugin Private Share https://github.com/plegall/Piwigo-private_share that should already do quite the job, would you like to test it on your Piwigo.com account? <!-- github-comment-id:171591009 -->
Author
Owner

(My GitHub login is moy without the second m, so I didn't get a notification, I'm finding this now only)

Private Share doesn't do the job for me for several reasons:

  • First, it only allows sharing individual images, right? I never do that, I always share albums at once.

  • The plugin insists in sending an email directly, I didn't find a way to get the link without having an email sent directly by piwigo. This has tons of disadvantages over getting a link I could cut-and-paste in my mailer, like

    • I just get a plain text field, I don't have my mailer's address book available
    • It doesn't allow customizing email subject
    • Emails sent from piwigo are more likely to be marked as spam than the ones I send manually
    • If there's an existing email discussion with people sending their pictures, I can't just hit reply from my mailer and say "and here are mine: http://piwigo.com/..."

I'm still stuck with my "one user per event" approach, but I'd be lying if I claimed I found it convenient.

(My GitHub login is moy without the second m, so I didn't get a notification, I'm finding this now only) Private Share doesn't do the job for me for several reasons: * First, it only allows sharing individual images, right? I never do that, I always share albums at once. * The plugin insists in sending an email directly, I didn't find a way to get the link without having an email sent directly by piwigo. This has tons of disadvantages over getting a link I could cut-and-paste in my mailer, like * I just get a plain text field, I don't have my mailer's address book available * It doesn't allow customizing email subject * Emails sent from piwigo are more likely to be marked as spam than the ones I send manually * If there's an existing email discussion with people sending their pictures, I can't just hit reply from my mailer and say "and here are mine: http://piwigo.com/..." I'm still stuck with my "one user per event" approach, but I'd be lying if I claimed I found it convenient. <!-- github-comment-id:291006610 -->
Author
Owner

I see that the last comment from @moy has not been answered. I am in the exact same configuration : I just want to share albums (or a series of albums) through a "private" link with the form "http://mygallery.example.com/?auth=ABCDEF"

Today, Event cats still work for this purpose with Piwigo 2.8, but is buggy (in particular there is a problem in HTTPS due to mixed-content being downloaded in the administration pages). Private Share seems only to address the particular case of individual images : is there any plans on improving it to the level of Event Cats?
Thanks in advance

Goulou

I see that the last comment from @moy has not been answered. I am in the exact same configuration : I just want to share albums (or a series of albums) through a "private" link with the form "http://mygallery.example.com/?auth=ABCDEF" Today, Event cats still work for this purpose with Piwigo 2.8, but is buggy (in particular there is a problem in HTTPS due to mixed-content being downloaded in the administration pages). Private Share seems only to address the particular case of individual images : is there any plans on improving it to the level of Event Cats? Thanks in advance Goulou <!-- github-comment-id:348763191 -->
Author
Owner
http://piwigo.org/ext/extension_view.php?eid=865 <!-- github-comment-id:348763298 -->
Author
Owner

wow... that was fast!! :-)
I will test it right now!

wow... that was fast!! :-) I will test it right now! <!-- github-comment-id:348763390 -->
Author
Owner

By looking at the description, it seems that this plugin allows one to share individual albums, which is not exactly how Event Cats worked : it allowed to create an authentication link that automatically logs in as a specific user. It it very useful if you want, say, to share every year a link to your family with the new albums of the year, while also keeping the old ones...
I read about the issue https://github.com/Piwigo/Piwigo/issues/404 , but I don't understand it : it seems that the exact feature I'm looking for has been included in Piwigo 2.8.0 by @plegall , but I can't find anything in the settings about it... :-(

Thanks a lot anyway, I hope I'll find it soon! :-)

Goulou

By looking at the description, it seems that this plugin allows one to share individual albums, which is not exactly how Event Cats worked : it allowed to create an authentication link that automatically logs in as a specific user. It it very useful if you want, say, to share every year a link to your family with the new albums of the year, while also keeping the old ones... I read about the issue https://github.com/Piwigo/Piwigo/issues/404 , but I don't understand it : it seems that the exact feature I'm looking for has been included in Piwigo 2.8.0 by @plegall , but I can't find anything in the settings about it... :-( Thanks a lot anyway, I hope I'll find it soon! :-) Goulou <!-- github-comment-id:348766307 -->
Author
Owner

@plegall : any chance we can get Share Album on piwigo.com?

@plegall : any chance we can get [Share Album](http://piwigo.org/ext/extension_view.php?eid=865) on piwigo.com? <!-- github-comment-id:348812831 -->
Author
Owner

@moy please go ahead, I just installed it (hidden by default, but visible to you)

@moy please go ahead, I just installed it (hidden by default, but visible to you) <!-- github-comment-id:348956166 -->
Author
Owner

Thanks!

Thanks! <!-- github-comment-id:348957361 -->
Author
Owner

Hi, I've made a try with Share Album, but without success so far.

  1. It works only with private album (only on those appears the symbol or text "share"). Then it doesn't solve the context explained at the top of this thread, i.e. to get an url for public album which contains privates pictures.
  2. With the theme "stripped" the command "share" is inactive (but with theme "Sylvia" I get the url for a private album).
  3. When I use the url without being logged I get a message "Forbidden Access" and I'm invited to log in. (Inside the private album pictures are also private ...)
Hi, I've made a try with Share Album, but without success so far. 1. It works only with private album (only on those appears the symbol or text "share"). Then it doesn't solve the context explained at the top of this thread, i.e. to get an url for public album which contains privates pictures. 2. With the theme "stripped" the command "share" is inactive (but with theme "Sylvia" I get the url for a private album). 3. When I use the url without being logged I get a message "Forbidden Access" and I'm invited to log in. (Inside the private album pictures are also private ...) <!-- github-comment-id:403639428 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#269