ConstConfigures Amplify with the resourceConfig and libraryOptions, publishing the resulting branded context as the global AmplifyContext.
If libraryOptions is omitted on a reconfigure, the previously configured
non-Auth libraryOptions are preserved (mirroring the previous singleton
merge behavior); when provided they replace the previous ones. When
resourceConfig.Auth is present and the caller does not supply
libraryOptions.Auth, the default Cognito token/credentials providers are
wired using cookie storage (ssr: true) or localStorage (default), and
the singleton token provider's auth config is re-synced on every call so a
reconfigure with a new userPoolId retargets token refresh.
The ResourcesConfig object that is typically imported from the
amplifyconfiguration.json / amplify_outputs.json file. It can also be an object literal
created inline when calling Amplify.configure.
OptionallibraryOptions: LibraryOptionsThe LibraryOptions additional options for the library.
Fetches the current auth session from the global context.
Optionaloptions: FetchAuthSessionOptionsReturns the ResourcesConfig object passed in as the resourceConfig parameter when
calling Amplify.configure.
If configure() has not been called yet, this warns and returns an empty
config object ({}) rather than throwing, preserving the historical
pre-context singleton behavior that callers (and release-gating e2e tests)
depend on.
An ResourcesConfig object.
Fetches auth tokens from the global context.
The
Amplifysingleton facade provides the v6-compatible, global-stateconfigure()/getConfig()API. It builds a branded, frozen AmplifyContext, publishes it as the global context (so category APIs can be called without an explicit context argument), and dispatches theconfigureHub event that side effects such as auth's OAuth listener depend on.