Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FileMaker Cloud authentication #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

steveWinter
Copy link

As you may be aware FileMaker cloud uses an alternative initial login process to request the token used for subsequent calls utilising AWS Cognito.

This PR adds a constructor parameter which allows the use of FMCloud to be indicated (defaulting to false) and provides the necessary functionality to login to FileMaker Cloud. The AWS Cognito library is added as a dependency.

Credit to Christos Savva of Velistar Ltd, who did the initial work implementing this in a copy of the the /lib folder which streamlined the process of updating the typescript for this PR.

@DASPRiD
Copy link
Collaborator

DASPRiD commented Apr 17, 2022

Thanks for your contribution! I see a few things which would have to be addressed thought:

  • First, please rebase against the latest main, we performed some housekeeping.
  • Ideally, this should be implemented in a way which makes amazon-cognito-identity-js an optional dependency. This could be achieved by e.g. using dynamic imports.
  • The pool configuration should be loaded dynamically, see here for an example: https://github.com/soliantconsulting/fm-odata-client/blob/main/src/ClarisId.ts#L100-L118
  • You should also look into validating the token validity and refresh it if required.
  • Your implementation should be completely covered by unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants