datamweb / shield-oauth

OAuth for CodeIgniter Shield
https://www.shield-oauth.codeigniter4.ir/
MIT License
61 stars 16 forks source link

Dev: Make command to create new OAuth #35

Closed sammyskills closed 1 year ago

sammyskills commented 1 year ago

This PR helps to quickly create and update the necessary file(s) to build a new OAuth. Fixes #3

sammyskills commented 1 year ago

Why do we have this as callbake_url instead of callback_url? https://github.com/datamweb/shield-oauth/blob/4da6cdfd7aec4590b0bf9d7e6c880b6508f82763/src/Libraries/GithubOAuth.php#L32

https://github.com/datamweb/shield-oauth/blob/4da6cdfd7aec4590b0bf9d7e6c880b6508f82763/src/Libraries/GoogleOAuth.php#L35

Is it intentional?

datamweb commented 1 year ago

Is it intentional?

No just typo🫣.

sammyskills commented 1 year ago

No just typo🫣.

Ok, fine. Should I create a new PR to fix that or should it be included as a commit in this PR?

datamweb commented 1 year ago

Should I create a new PR to fix that or should it be included as a commit in this PR?

If you can, a new PR is the best choice. please🥀

sammyskills commented 1 year ago

If you can, a new PR is the best choice. please🥀

Sent a PR #36

sammyskills commented 1 year ago

About the languages files, will that still be necessary?

I ask because the number of files will definitely increase as more developers start using the library, and it may become very difficult to manage.

What do you think?

datamweb commented 1 year ago

What do you think?

Maybe it would be good to display the message and explain it.

sammyskills commented 1 year ago

Maybe it would be good to display the message and explain it.

How do you suggest?

datamweb commented 1 year ago

How do you suggest?

Don't forget to translate the language strings. See https://github.com/datamweb/shield-oauth/blob/develop/docs/add_other_oauth.md#add-lang-file for details.

I'm not sure about this, the final decision is yours.

sammyskills commented 1 year ago

I'm not sure about this, the final decision is yours.

Personally, I don't think it is ideal to automatically generate the language files for all languages. I feel it's best done manually, per PR, just like shield.

datamweb commented 1 year ago

Well, I run the command for the first time :star_struck:.

Delete file app/Config/ShieldOAuthConfig.php. Run command php spark make:oauth yahoo. Check out the path to app\Libraries\ShieldOAuth.

I think if file ShieldOAuthConfig.php doesn't exist, app\Libraries\ShieldOAuth\YahooOAuth.php shouldn't be created.

sammyskills commented 1 year ago

Yes, you are correct!

datamweb commented 1 year ago

And we forgot the documents 😂. Please update the documents.

sammyskills commented 1 year ago

I think I finally saw the need to automatically create the default language file, and I've included it in this commit.

Please review and let me know what you think.

sammyskills commented 1 year ago

Hi @datamweb,

Care to check the updates?

datamweb commented 1 year ago

@sammyskills Hi, sorry for the delay, I'm a bit busy, I'll try to check by the weekend.

Thank you!

datamweb commented 1 year ago

@sammyskills Thank you for your efforts. I'm really sorry for the delay. Sometimes life is unpredictable. I merged without checking, hope there is no problem.

sammyskills commented 1 year ago

@sammyskills Thank you for your efforts. I'm really sorry for the delay. Sometimes life is unpredictable.

Hi @datamweb, I totally understand.

I merged without checking, hope there is no problem.

I tested before pushing the commit. But please check when you are less busy. Thank you.