Application on SAP Cloud Foundry - OAuth 2.0 - Error: Something went amiss - oauth-2.0

I have been delevopping and deploying a python application for the SAP Cloud Foundry and trying to implement an authentication check using OAuth2.0.
Using this Tutorial.
Link to Code Note: I excluded the node_modules/#sap/approuter for storage reasons
When I open https://cproPythonAI_web.cfapps.us10.hana.ondemand.com the login site is loaded correctly, but after the login I get to a Error-Site.
Kind regards and thanks for help
Nick
did every step of the tutorial
entered "authenticationMethod": "none" to the xs-app.json. Then i get redirect to the index.html, but of course the authentification is skipped

Related

Unable to authorize to Google Sheets v4 API from web app using javascript

I am able to read and write data to a google sheet when running the web application on my localhost:8080 using the quickstart for v4 API.
When I deploy the app on external tomcat server, the authorization does not seem to happen at load
<script src="https://apis.google.com/js/client.js?onload=checkAuth">
I'm running the application at http://10.200.99.110:8080/MyApp. In the API manager credentials I have type 'Web Application' and Javascript origin uris' as
http://localhost:8080
http://10.200.99.110:8080
I am a beginner to OAuth and would appreciate any help in getting it to work.
Apparently there was some problem in tomcat, I did a reload from the tomcat manager after deploying a new war file and it worked.
Also, I noticed that modifying javascript origin uris in Google API Credentials manager takes couple of minutes to reflect in the application.

Custom Federation for OAuth in WSO2

To write custom federation , after generating jar using pom from wso2 docs , i put that in said folder . but how do use this custom federation , Documentation stops after this .
I cant see my new custom federation name in any drop down , i was expecting to see this in the list of federation drop down in Service Provider configuration
If we write custom federation for Oauth IDP , all the urls configuration have to be programatically managed in OSGI bundle, we wont get UI for that ?
Why is OAuth not supported if we have any other vendor apart from facebook and google, yahoo, which is not openid connect we cant use any out of the box SSO .
i got my Bundle loaded on to WSO2 these were the steps
i started wso2 with osgi console
$>wso2Server.bat -DosgiConsole
After this server starts and if we hit enter we can get osgi prompt
there we can type osgi commands
try $> package org.abc.whateverpackage
this will list all the bundles that import/export the given package name within the runtime.
try to $install file:<filepath> this gives an error message saying something is missing in imnport or whatever issue might be
im my case i started with pom from wso2 so i had to correct the configuration
from org.wso2.carbon.identity.application.authentication.framework.*,
to org.wso2.carbon.identity.application.authentication.framework.*;version="4.2.2"
the number 4.2.2 i got from the dependencies in the pom
i added BundleActivator
<Bundle-Activator>com.osgi.customauth.Activator</Bundle-Activator>
Now when i create an IDP i can see my custom Authenticator in the list along with google , yahoo etc
But all the urls for OAUTH are in my code i have to programatically externalize this , i did not yet find a clean way to do this

Google Auth does not work in template asp.net mvc project

So I have VS 2013 update 4 and I created ASP.NET MVC application from template and configured Google authentication by using UseGoogleAuthentication method and passing client ID and secret. But for some reason once I click 'Accept' button google page I'm redirected to the page I expect but there is an error 500 in the browser console and nothing on the page itself.
I read a lot of articles and enabled all required APIs in Google Developer console. But nothing seems to work for me.
Also I have another custom authentication middleware that worked just fine before and stopped working once I enabled Google. I use nuget package version 3.0.1.
If I disable my custom auth middleware Google still does not work.
Please advise.
OK, here's why should probably stay with default values. So default redirect URL is /signin-google built-in to Google middleware. And because my URL is /Account/ExternalLoginCallback I thought it was a good idea to set it when configuring GoogleOAuth2AuthenticationOptions.
Once removed CallbackPath = new PathString("Account/ExternalLoginCallback") from configuration it just worked.

Steam OpenId in MVC application

I have never done an openid application before. I did see that MVC 5 has some built in oauth sign ins. I was able to get these to work no problem, as they are already built.
But I am completely unsure how to get the steam openid to work in MVC. Does anyone have some sample code of there MVC Steam OpendID stuff? Or does anyone know a good tutorial for this?
Go to Tools > Library Package Manager > Package Manager Console and type:
Install-Package Owin.Security.Providers
Open your App_Start\Startup.Auth.cs, and add:
using Owin.Security.Providers.Steam;
Then, in the ConfigureAuth method, add:
app.UseSteamAuthentication("your API key");
You can get an API key from http://steamcommunity.com/dev.
A "Steam" button should be added to your login page.
Here is an excellent tutorial on how to integrate openid with ASP.NET MVC, and it do have working code, and instructions. Please have a look and get going.
http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx
Hope this helps.

Doodle.com API / OAuth2Client with MVC4 & C#

im trying to implement a custom OAuth2Client for my ASP MVC4 Application so that the users can login with their doodle.com Account.
Based on this Code, i tried to give it a shot. Unfortunately, im always getting an error 400 "bad request". Any ideas on this? My Login-Urls look like this:
http://doodle.com/api1/oauth/requesttoken?oauth_callback=http%3A%2F%2Flocalhost%3A49705%2FAccount%2FExternalLoginCallback%3F__provider__%3DDoodle%26__sid__%3D81daa197e305495b916b0f347fadf1c0&oauth_consumer_key=MYKEY&oauth_nonce=557897134&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1384429618&oauth_signature=NODC1gMPquzNx9TVg2wVoaZqjlk%3d
You can find my gist here: https://gist.github.com/davidroyal/7469100
I got it working on my own. Backdraft: You have to authorize your application on every login. But for connecting your doodle.com account with an existing account in your application, its just perfect.
Please find the experimental implementation under:
https://gist.github.com/davidroyal/7469100

Resources