Page 1 of 1

Problem: authenticate users for access the application

Posted: Sat Aug 06, 2016 12:58 am
by xidea
Hello,

I am stucking with a big problem in my app. I need to authenticate users in some way while hosting my app in an ASP MVC based website that wraps the application page. When a user logs in the website, the app must be aware of that and provide services for that user.

Is there a way to do this? I would not implement a custom authentication process directly in the app, for security reasons, I think there is a lot of limitation and complications that way. Using OAuth could be the way?

Thanks


Flavio

Re: Problem: authenticate users for access the application

Posted: Tue Aug 09, 2016 11:55 pm
by ThibTib
You could use a web service ?

Re: Problem: authenticate users for access the application

Posted: Fri Aug 12, 2016 1:29 am
by JS-Support @Userware
Support for ASP.NET authentication in CSHTML5 is coming within 8 weeks.

Thanks.
Regards,
JS-Support

Re: Problem: authenticate users for access the application

Posted: Fri Aug 12, 2016 9:11 am
by xidea
Good news.

But, in the meantime, have you some hint about the inclusion of the app in a MVC app that manages the user authentication? For now, the app and the MVC website are two separate things, and there is perhaps a way to share js variables and functions by including the index.html in a MVC view by rendering his content using razor helpers.
By having the app page integrated in the rendered view, I could call js functions definded in the view via ExecuteJavascript, so I could share an authentication token that way. I need the app to be aware of what user is logged in the MVC site, so the app must know some way the User ID or some token representing the logged user in the server side WCF service context.
I think this is different from app-inside authenticating the user. It is precisely what I would not to do: the app is working inside the website context and must make use of it.

Sorry, my English is not so good to better explain the problem.

Now I think I can achieve this by writing a JS function in the MVC view markup (that includes the index.html markup) which returns info about the session, and call it from the app using ExecuteJavaScript. The app could then call the WCF service passing those info, and the WCF service could manage that info to retrieve user info and store his "logged in" state.

I've already tested the inclusion of the index.html in a ASP.NET MVC view with some success, not yet tried to put a js func in it and call from the app, but I think this is possible, as the view is rendered as an extended index.html, containing the function that I would call.

Thanks,

Flavio

Re: Problem: authenticate users for access the application

Posted: Thu Nov 10, 2016 10:04 am
by xidea
Any news? :)