locked
bypass login in Lightswitch RRS feed

  • Question

  • I have a guest account in my Lightswitch app.  I want to bypass the login page, what would my URL look like that would bypass the login page and login with a given username/password?

    Friday, May 25, 2012 1:50 AM

Answers

  • There is no supported what of bypassing authentication. And the unsupported way would not be straight-forward, could be broken by any update that team publishes, and (as already stated) is not supported.

    Why don't you just state somewhere on your website/marketing/etc "Use <username> for the user name and <password> for the password to try out this application."?


    Justin Anderson, LightSwitch Development Team

    • Marked as answer by Trexium Friday, May 25, 2012 3:05 PM
    Friday, May 25, 2012 6:33 AM
    Moderator
  • If you're familiar with ASP.NET programming, you could follow the instructions at my blog post on creating a custom login page http://blogs.msdn.com/b/mthalman/archive/2011/12/08/creating-a-custom-login-page-for-a-lightswitch-application.aspx.  And instead of having the page display login controls for the user, you could code it in such a way that it would automatically authenticate the user with using the guest credentials and redirect you to the LightSwitch app URL.  Or you could even display the login controls for your normal users but also have a button or something that would allow the user to login as a guest.
    Friday, May 25, 2012 1:20 PM

All replies

  • There is no supported what of bypassing authentication. And the unsupported way would not be straight-forward, could be broken by any update that team publishes, and (as already stated) is not supported.

    Why don't you just state somewhere on your website/marketing/etc "Use <username> for the user name and <password> for the password to try out this application."?


    Justin Anderson, LightSwitch Development Team

    • Marked as answer by Trexium Friday, May 25, 2012 3:05 PM
    Friday, May 25, 2012 6:33 AM
    Moderator
  • If you're familiar with ASP.NET programming, you could follow the instructions at my blog post on creating a custom login page http://blogs.msdn.com/b/mthalman/archive/2011/12/08/creating-a-custom-login-page-for-a-lightswitch-application.aspx.  And instead of having the page display login controls for the user, you could code it in such a way that it would automatically authenticate the user with using the guest credentials and redirect you to the LightSwitch app URL.  Or you could even display the login controls for your normal users but also have a button or something that would allow the user to login as a guest.
    Friday, May 25, 2012 1:20 PM
  • The link is not working

    Friday, May 25, 2012 2:43 PM
  • Fixed
    Friday, May 25, 2012 2:47 PM
  • I believe this will work...thank you!

    Friday, May 25, 2012 3:06 PM