Giter Club home page Giter Club logo

Comments (7)

danilop avatar danilop commented on May 20, 2024

The login can be used in two ways:

  • inside your application, you manage the logic
  • to access AWS services straight from JavaScript, using Amazon Cognito (the token returned by the login function is using Developer Authenticated Identities)

from lambdauth.

jzkunlun avatar jzkunlun commented on May 20, 2024

Danilop,

Thank you for your reply. Do you have a simple javascript example which
uses this successful login from login.html to access another lambda
function? Or point me somewhere i can find them.

thanks,

Jing

On Sun, Aug 2, 2015 at 12:09 PM, Danilo Poccia [email protected]
wrote:

The login can be used in two ways:

  • inside your application, you manage the logic
  • to access AWS services straight from JavaScript, using Amazon
    Cognito (the token returned by the login function is using Developer
    Authenticated Identities)


Reply to this email directly or view it on GitHub
#9 (comment).

from lambdauth.

danilop avatar danilop commented on May 20, 2024

You can have look at the changePassword.html in the www directory.
With Amazon Cognito, you can have two AWS IAM roles, one for unauthenticated users, one for authenticated ones. See the two Cognito_*.json files in the iam directory.
The ChangePassword function is available to authenticated users only, so you need to be logged in to access it.
The ResetPassword on the other side is unauthenticated, because you can assume you lost your password and cannot login if you want to reset it (and it implements an email verification for security reason).

from lambdauth.

jzkunlun avatar jzkunlun commented on May 20, 2024

Great, thank you very much!!

Jing

On Sun, Aug 2, 2015 at 12:38 PM, Danilo Poccia [email protected]
wrote:

You can have look at the changePassword.html in the www directory.
With Amazon Cognito, you can have to AWS IAM roles, one for
unauthenticated users, one for authenticated ones. See the two
Cognito_*.json files in the jam directory.
The ChangePassword function is available to authenticated users only, so
you need to be logged in to access it.
The ResetPassword on the other side is unauthenticated, because you can
assume you lost your password and cannot login if you want to reset it (and
it implements an email verification for security reason).


Reply to this email directly or view it on GitHub
#9 (comment).

from lambdauth.

jzkunlun avatar jzkunlun commented on May 20, 2024

You may saw my another question related with this topic.

Why are there no 'logout' functionality? Is no logout best practice? Where
are the auth info keep, in http header or post payload or get parameters?

thanks,

Jing

On Sun, Aug 2, 2015 at 12:38 PM, Danilo Poccia [email protected]
wrote:

You can have look at the changePassword.html in the www directory.
With Amazon Cognito, you can have to AWS IAM roles, one for
unauthenticated users, one for authenticated ones. See the two
Cognito_*.json files in the jam directory.
The ChangePassword function is available to authenticated users only, so
you need to be logged in to access it.
The ResetPassword on the other side is unauthenticated, because you can
assume you lost your password and cannot login if you want to reset it (and
it implements an email verification for security reason).


Reply to this email directly or view it on GitHub
#9 (comment).

from lambdauth.

danilop avatar danilop commented on May 20, 2024

In the sample implementation included in the www directory the auth info in retrieved in JS variables (identityId and token). So logout is managed client side to just "forget" those parameters and refresh Amazon Cognito credentials.

from lambdauth.

rossrossp avatar rossrossp commented on May 20, 2024

Hello,
At what point/where are you assuming Cognito_LambdAuthAuth_Role when you log in?
Can you point me to the code which manages this?

Thanks,
Ross.

from lambdauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.