You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the amplify-react components (version 0.1.33) along with withAuthenticator as shown below. The issue that I am running into is that once I login to the my application I seem to never be prompted for authentication again unless I explicitly logout.
For instance, I say I login on Friday, do somethings, and then just close my browser or simply stop using the app. Come in on Monday load the app in my browser and what I see is the login screen show for a brief time and then without interaction I am into the application itself, without having provided my credentials.
I initially thought that this was because of the default refreshToken expiration time being 30 days. I trimmed that down to a single day and still see the same behavior. This is even after wiping out the local application storage before logging in again, just incase I still had an old refresh token with a lengthy expiration date set on it.
Is this expected? Is there something else I need to set to force an actual login from the user after a certain amount of time?
Thanks
import 'babel-polyfill';
import React, { Component } from 'react';
import FileUpload from "./FileUpload";
import Amplify,{Storage} from 'aws-amplify';
import { withAuthenticator } from 'aws-amplify-react';
import aws_exports from './aws-exports';
@rdingwell in regards to refresh tokens. Amplify automatically refreshes these for you when they expire. So essentially this intended behavior with the library. We do have in our backlog the ability to configure this behavior yourself i.e. listen for when the tokens are going to expire and handle yourself appropriately, see here for tracking this feature: #42
If you feel that issue doesn't capture your request adequately, please feel free to re-open/clarify here thanks!
I'm using the amplify-react components (version 0.1.33) along with withAuthenticator as shown below. The issue that I am running into is that once I login to the my application I seem to never be prompted for authentication again unless I explicitly logout.
For instance, I say I login on Friday, do somethings, and then just close my browser or simply stop using the app. Come in on Monday load the app in my browser and what I see is the login screen show for a brief time and then without interaction I am into the application itself, without having provided my credentials.
I initially thought that this was because of the default refreshToken expiration time being 30 days. I trimmed that down to a single day and still see the same behavior. This is even after wiping out the local application storage before logging in again, just incase I still had an old refresh token with a lengthy expiration date set on it.
Is this expected? Is there something else I need to set to force an actual login from the user after a certain amount of time?
Thanks
import 'babel-polyfill';
import React, { Component } from 'react';
import FileUpload from "./FileUpload";
import Amplify,{Storage} from 'aws-amplify';
import { withAuthenticator } from 'aws-amplify-react';
import aws_exports from './aws-exports';
Amplify.configure(aws_exports);
Storage.configure(aws_exports);
Storage.configure({
level: 'private'
});
class App extends Component {
render() {
}
}
export default withAuthenticator(App,{ includeGreetings: true });
The text was updated successfully, but these errors were encountered: