Something's wrong with my login feature, I used okta with google oauth2 - jhipster

I use Okta to securiry my jhipster app.
I am trying to follow this guide Create an App at the Identity Provider
Google and I config response_type: code
It works fine, but i get #code=ovy8omeh8NdmAl47iZ7BeS9YvAaPAfMYqBIed-evSxk&state=WM6D without logging in
When I click login again, I can login
Please help me! thanks very much

Related

DocuSign oAuth 2.0 for system to system integration

We are currently using basic authentication for our DocuSign apps. Our application requires no human interaction for envelope creation. Backend code does a basic authentication and creates the envelopes.
We want to move to oAuth 2.0. I went through DocuSign's web site and read about different kind of OAuth grant flows.
I downloaded there quickstart code (Authentication grant code flow) but it did not work for me as I was always getting HTTP error 404 at the time of redirection. It seems, for our system integration JWT grant flow should work, but again it has a consent form, which requires someone to approve.
Can someone help me with sample code on oAuth 2.0 with System integration?
You can use administrative consent for JWT which means that the organization need only consent once and the app can then be used by all users. No one will need to log in to DocuSign to use your integration.
I would like to help with the issues you had with quickstart, but not sure what language you tried.
Download a fresh Java Quickstart from https://developers.docusign.com/docs/esign-rest-api/quickstart/
Run Java Quickstart in command line per these instructions: https://developers.docusign.com/docs/esign-rest-api/quickstart/overview/#configuration > Java tab > Building and running Quickstart
Get JWT consent for app: Login > Dropdown: JSON Web Token Grant > Authenticate with DocuSign > Log In > Allow Access
Extract ds-java-auth-final.zip located at https://github.com/docusign/code-examples-java/blob/master/docs/ds-java-auth-final.zip
Fill in ds-java-auth-final/src/main/java/test.newOAuth/Config.java with your client-id and impersonated-user-guid from your Quickstart_folder/src/main/resources/application.json
Fill in your API account ID from the Apps and Keys page https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey
Fill in the ds-java-auth-final/privateKey.txt file with your private key from Quickstart_folder/src/main/resources/private.key
Right click on ds-java-auth-final folder and Open Folder as IntelliJ IDEA Project
In Project window, navigate to ds-java-auth-final/src/main/java/test.newOAuth/DsNewAuth
After building, right click and Run 'DsNewAuth.main()'
Please let me know if you have any questions

oAuth in a regular MVC application

I just finished integrating DocuSign API into my C# MVC application. My MVC app is NOT .net core. So far I worked with OAuth Token Generator from the developer portal of DocuSign and hard coding the returned token.
Now I need to implement the oAuth token generation on the fly and
I need to do the Authorization Code Grant. But not sure how to implement it with C#. When I make a request to
https://account-d.docusign.com/oauth/auth?XXXXXX
from MVC app I am getting a cross domain error. Please advise how to proceed?
Once again I am using a regular MVC app and NOT Core. In the sample app is in Core and
that doesn't help me.
Any help is greatly appreciated.
thanks
Are you using latest Chrome? its default mode would have strict cookies and not allow an app launched from localhost to store cookies in other domains.
Another option is that you're using an iframe, that is not allowed for auth either.
I would suggest you install the VS Extension and add DocuSign to your app as a way of a shortcut.
Otherwise, may need to debug the issue, try a different browser, host your code somewhere or change the way you do auth.

JHIPSTER OKTA invalid_id_token

I followed the steps on JHIPSTER to setup okta. When I try to login I always get the following output:
Login with OAuth 2.0
[invalid_id_token]
https://dev-992900.okta.com/oauth2/default
I cant resolve it. Additionally, I would prefer to be using a google identity provider. I am not sure how to setup the google identity provider, and additionally I cant even get the login setup correctly.
Please advise how to find answer for issue 1.
Deleted and re setup the configuration as per JHIPSTER documentation for okta setup. I tried adding my email to the groups, and tried it without a user added, with a user added.
Login with OAuth 2.0
[invalid_id_token]
https://dev-992900.okta.com/oauth2/default
security:
oauth2:
client:
provider:
oidc:
issuer-uri: https://dev-992900.okta.com/oauth2/default
registration:
oidc:
client-id: 0oa1aykbfvUKOJN4S357
client-secret: gpuNPCPBQWl_JJLAMZh6fFlc1XyuBoCTtKtm2JYD
OKTA CONFIG SCREENSHOT
OKTA CONFIG SCREENSHOT 2
OKTA CONFIG SCREENSHOT 3
OKTA CONFIG SCREENSHOT 4
I followed okta tutorial here: https://www.jhipster.tech/security/ and it does not work. Additionally I would prefer to use google identity service.
Alright, this is totally awesome, infuriating, and what drives me crazy. I found the issue which is now resolved. I set my windows 10 pc to automatic time. I cannot believe it was that, but I guess thats why token was invalid. It was the correct time but it wasnt set to automatic time sync. I had automatic timezone set though. I literally spent weeks stalled because of this :|
time automatic

Azure Web App logout from AAD Authentication

i am unable to logout from my simple azure web app that has Azure active directory as the authentication provider.
the user logs into the site using the AAD login page shown here
but i am struggling to find out how to log the user out.
i tried using the various undocumented logout urls like
https://login.microsoftonline.com/<tennantid>/oauth2/logout
although they report the the user is logged out, it isnt. As returning to the previous URL goes straight thru without a sign page.
i am guessing there are some cookies that need to be cleared but where on earth is all this stuff documented?
any help is most appreciated.
Did you try "[your-domain]/.auth/logout"?
I too had a very hard time figuring this out and I found it in the comments of this blog post.
Hope it helps!

Cognito Developer Authenticated Identities with Node

I'm trying to create a login system with Node as the backend/web service for the app, also with an iOS app. I'm trying to use Amazon Cognito to do this, but I can't figure out how to register/authenticate users from either end. The only tutorials I've been able to find use Facebook login, which don't help me.
Edit: I have unauthenticated identities working somewhat, but I'm still clueless as to the authenticated developer identities.
While I understand you are looking specifically for a Node sample, we do have a full end-to-end sample with a Java backend and iOS and Android clients.
The clients also handle transition from unauthenticated to authenticated, linking multiple logins with your developer identity and more. Hopefully this will help fill the gaps you have. If not, please let us know what we can do to improve.

Resources