Google OAuth Signin keeps looping back to Login page .NET MVC - asp.net-mvc

First off: I'm sorry that this is a repeat of probably a million posts of the same problem, but none of the answers there helped me and I am feeling very frustrated, stressed, and stupid that I can't figure this out.
Here are the facts:
I have a web application built with .NET Framework 4.72.
I have enabled all the right stuff in the code.
I am using the the most up to date packages for Google and OWIN.
I have created the Client IDs in the Google Cloud Platform and have added the authorized URIs and Origins
I have added test users and am using ONLY those emails
I works in Firefox AND Safari, but NOT in Chrome
If you really need the code, I can show you the code, but I have added nothing custom. It's the same code that works in Firefox. It even fricking works when running locally in Chrome, but it just does not work when on the server. This happens for me and another test user.
Please, can someone help? I am banging my head against my desk and close to tears because I am trying everything I can find on the Internet and nothing is working (or I am doing it wrong).

Related

How to deploy apps with Microsoft Graph support

basically I want to deploy a NET.Core application where Calendar data will be read from an Exchange server account.
So the user has to fill out his login data and that it.
This works fine with Exchange.Webservices in Windows, but Exchange.Webservices are not working in Linux due the .NETFramework dependency.
I also tried the "Sherlock Exchange.WebservicesStandard" package which is also not working.
Microsoft Graph is a product I don't understand.
Is is correct, that every user needs to have an Azure Account and his own APPID?
If that is correct, this product seems to be a little bit useless in my opinion.
Any ideas?
Best regards!
As a developer, you will need an appid for your application which you will get from https://portal.azure.com/. Users of your application will not need any of this.
Please see this link with Quick Starts to help you with development using Microsoft Graph https://developer.microsoft.com/en-us/graph/quick-start

Publishing MVC app on web

I am trying to publish my app on the web. It is very simple app, I have just start to learn MVC. To publish my app I have followed the instructions given at http://www.asp.net/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis. However I cannot see app from other PCs. I see it in browser from the PC where I have created it, but when I try to open it from another PC it is not visible, the link I am trying to access is the one I created during publishing - http:/localhost/WebApplication1. I am not sure what I am doing wrong. Or maybe the example I followed is not correct for the thing I want to do. Could,please someone tell me what I am doing wrong? Thank you in advance.
If you publish your site on localhost, you'll see it only in your local network. To publish it on the web, you'll need some web hosting service. You can try, for example, Microsoft Azure, it works perfectly with ASP.NET (not too surprisingly, as it comes from Microsoft), has a 30 day free trial period and otherwise is relatively cheap for low usage.

Google Maps API Suddenly Not working On Public Server

Google Maps API v3 suddenly stopped working on my live server; however still works on my localhost. I haven't changed anything, so I assume it doesn't have to do with my code.
Also note that my production and development servers are the same.
I'm running Ruby 1.93 and Rails 3.2.13 using Refinery. I created a location extension for refinery; which is just a locations model, and I use Rails Geocoder to geocode the address for Google Maps Api.
I Have a search field that uses the maps api for near locations.
It stopped working a couple of days ago, and then started working again last night.
I just randomly tried again after I pushed some unrelated stuff to git. It was still working this morning.
Then I was working on some unrelated things did a push, and just tried it again and it's not working again.
No matter what, it still works on my localhost and I'm stuck. Does anyone have a clue, or does anyone else have any issues currently with Google Maps API v3
EDIT: New Issue Working on Resolution: Follow Up Here Setting up Rails Geocoder with Personal API Key
For most applications, it is recommended to do any geocoding on the client side. This not only helps you avoid the usage limit, which is based on IP address, but it keeps some stress off your server.
If geocoding on your application happens when people enter an address through a search field, this is a great option, and you can still send any info you need back to your server through an ajax call.
For further strategies, see here: https://developers.google.com/maps/articles/geocodestrat
I sadly went with Microsoft's Bing service. Google Premier account is 10,000 bucks. I was just bragging how I was Microsoft free for almost 2 years. Sad Day. Meanwhile I'll work on making geocoding client side. Thanks everyone.

Basic authentication in IIS MVC 3 site not working

I have just deployed an MVC 3 site to my Windows 2008 Web Edition (IIS 7) server, and am trying to set up Basic Authentication so that it will not allow unauthorized access. This seemed to work at first, but once I was troubleshooting a problem and making changes, now that this issue is fixed, my basic authentication for some reason no longer works -- it's letting anybody on.
Under my Authentication settings in IIS7, I have Basic Authentication enabled, and all other forms of authentication disabled. I've also tried other various combinations, and so far, everything I've tried is leaving the site wide open.
I wondered if it was caching my credentials, so I tried from a different browser from which the site has not been accessed, and it's still leaving it open.
Am I overlooking something obvious here? I thought all I had to do was leave all forms of authentication disabled, except for Basic? Any ideas what could be going on?
If not, any ideas on what I could do to troubleshoot? Is there anything I could see in Firebug to see what may be going on?
Thanks in advance.
Ultimately, this was what I was trying to accomplish, I just wasn't sure how to articulate it. After reading the article linked in that answer, I'm going to try to figure out a different way to limit access to this site (either by IP or using my single-level authentication).

Work flow for authentication and API use with Twitter on OAuth

I'm a bit confused about all this OAuth bruhaha in the sense that all the examples I can find are for web applications and none of them for desktop applications.
I understand the Web application work flow, but that includes some redirections between the web app and twitter.
How does one do this in an desktop application?
How does the redirects work?
Should I have to include a Web Browser object?
Is there a way to go around this?
Could anyone point me to resources instead of a full blown solution please?
Thanks
Not sure which language you're using, but the .NET library for Twitter called Tweetsharp has a post on using Tweetsharp from a desktop app and authenticating via OAuth. See http://tweetsharp.com/?p=68. If you're not using .NET then perhaps it will inspire something you can do?
Basically, what tweetsharp does is launch the browser to the authentication URL and then waits for the user to return. I don't know of any way to do this other than something like that (Or include a WebBrowser control of some kind to launch the authentication URL in your own window).
Here's a straightforward solution, implemented as a set of PHP scripts for running from the command line. Well documented and explained, with a helpful 'verbose' option for debugging.
http://nullinfo.wordpress.com/oauth-twitter/
After some poking around and asking some questions about this subject to some other programmers, it looks like it's still an ongoing discussion, with no visible light at the end of the tunnel.
But for people interested on the ongoing discussion, here's the best link to have:
OAuth Desktop Discussion
I've seen a few desktop apps get around this by effectively embedding a browser into their program, so they can just open the in-app browser window to let you do the login and authorisation. This strikes me as a bit of a cheat or defeat of purpose because you still end up typing your ID and password inside the application anyway.
One possibility I was thinking of was, your desktop application could embed a mini HTTP server inside it. So then it launches the default browser to perform the authorisation, with a callback URL something like http://127.0.0.1:8765/oauthorized and then just listen for it.
Would that work?
Not sure what you would do for console applications... spawn a copy of lynx?
Include a WebBrowser control in your app. Put it in a panel or a separate form that you'll Form.ShowDialog().
Create a callback for the browser's successful posting of OAuth and one for a rejection. Don't forget to check for a FailWhale.
In the callback, you close the panel or form and store the token.
Here's a nice overview with sample code and everything: http://tweetsharp.com/2009/04/how-to-authenticate-a-desktop-application-with-oauth/

Resources