Just curious if anyone else is facing this issue with Laravel Spark where the notifications are intermittently stuck in loading and if there's a simple fix for it?
Ie:
Also, I'm receiving this Stripe error in my error console whenever I attempt to subscribe on my production environment, I am using the correct test credentials in the environment file:
Uncaught Error: You did not set a valid publishable key. Call Stripe.setPublishableKey() with your publishable key. For more info, see https://stripe.com/docs/stripe.js
at Function.b.validateKey ((index):3)
at Function.b.create ((index):2)
at Function.c.createToken ((index):2)
at o.subscribe (app.js:27)
at click (eval at pa (app.js:67), <anonymous>:3:52019)
at e (app.js:67)
at HTMLButtonElement.t._withTask.t._withTask (app.js:67)
In my .env file I have (I have put x's in for the purpose of this question, the env file has the real keys):
STRIPE_MODEL=App\User
STRIPE_KEY=pk_test_Nq6IKWIFjSaBFngxxxxxxxxx
STRIPE_SECRET=sk_test_T9lwCHZACcty5JUxxxxxxxxx
app/services.php and app/services-stripe.php both have these settings:
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
Any assistance is appreciated, thanks guys.
I had the same situation with the notifications. Apparently there's some kind of conflict with font awesome's spinner. I removed the icon completely and it's working now. Same with invitations, when I send an invitation, the text on the button changes but the spinner never hides.
Related
I'm at a loss here... I'm using Laravel 8 with the jetstream inertia stack. I've setup event listeners in my EventServiceProvider to log various authentication events but the events don't seem to fire as expected. Login and Logout both work as expected, but I can't figure out the logic behind Attempting and Failed. Attempting only seems to fire when I successfully login. If I pass an invalid email/password it never fires. And I can't seem to figure out when Failed ever fires. All I want to accomplish is logging attempts to login to my system, even if they are providing invalid credentials.
Here's my EventServiceProvider. All the listeners are very simple with just a line to log a message in the handle() method.
protected $listen = [
\Illuminate\Auth\Events\Attempting::class => [
\App\Listeners\Auth\LogAttemptingLogin::class
],
\Illuminate\Auth\Events\Login::class => [
\App\Listeners\Auth\LogSuccessfulLogin::class,
],
\Illuminate\Auth\Events\Logout::class => [
\App\Listeners\Auth\LogSuccessfulLogout::class,
],
\Illuminate\Auth\Events\Failed::class => [
\App\Listeners\Auth\LogFailedLogin::class,
]
];
I'm experiencing the same issues with exact same stack. It feels like LogFailedLogin not triggering is a bug or something.
I opened an issue as I'm having an hunch that it has to do with Fortify: https://github.com/laravel/fortify/issues/145.
Edit: It's a confirmed bug at the time of writing.
I want to create a collaborative text editor app and came across this tutorial. I accessed the repository on github and followed all the steps from the README file to install and use the app. Also, in the tutorial, after I created the app on Pusher, I checked the "Enable client events" option on the App Settings tab.
However, when I type anything in the note textfield, the two following errors appear on the browser's console:
1)
Pusher : Error : {"type":"WebSocketError","error":"type":"PusherError","data":
{"code":null,"message":"Invalid key in subscription auth data:
'xxxxxxxxxxxx'"}}}
2)
Pusher : Error : {"type":"WebSocketError","error":
{"type":"PusherError","data":{"code":null,"message":"Cannot broadcast
client event (connection not subscribed to channel presence-note.note-
test-for-pusherqjvQbgt4s9)"}}}
The second error happens when I type something and the first one right when I load the page. I presume the second one is happening because of the first one.
This is my broadcasting.php file:
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
'cluster' => 'us2',
'encrypted' => true
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
The values set in the env file I get from the app keys on my Pusher account. I've already double checked if the values are set correctly and it seems to be fine.
I appreciate any help. Thanks in advance
The first client side error suggests your auth endpoint isn't sending a valid response to the client, and Pusher can't validate it. Have you specified exactly the same credentials in your server as in your client? Especially the specification of the cluster.
The second client side error you're getting suggests that your client hasn't actually subscribed to the channel, which would mean that client events wouldn't work.
Double check your client side code to make sure it is actually subscribing to the channel in question. Also, double check the app settings in your Pusher dashboard to ensure client events are enabled.
Perhaps it would be helpful to enable logging on your client side Pusher object. See https://github.com/pusher/pusher-js#global-configuration
We've had the same issue and solved it for Laravel + Vue.
The problem was that the front-end developer is using another Pusher account for local development and he is sending compiled front-end files to git repo.
So, when I get the compiled js files, Echo is created with different credentials than mine because in my .env file there are my Pusher channel credentials.
Solution: npm run dev on my machine. (So that it compiles the js files and Echo will be created with my .env Pusher credentials)
P.S. This solution affirms answer of #kn100
Following steps work for me
Check your app keys at server and client side
run php artisan config:cache
run ``php artisan optimize:clear`
run composer dump-autoload
Restart your IDE
Test your app
I have a problem with the sessions on the shared hosting.
I developed an app on a local server (XAMPP) and it works great (sessions, auth etc). The problems have appeared when I moved the app on a shared hosting.
I realized that the sessions are not persisting from a page to another or from AJAX files to another page and the Authentication does not work either .
The only session that persists is the _token which has a different value after every refresh of the page.
I have the following configuration in the session.php file:
'driver' => 'database',
'lifetime' => 120,
'expire_on_close' => false,
'lottery' => array(2, 100),
'path' => '/',
'domain' => null
First, I used file driver and I had the same problem, and now I used the database.
Both file and database work on the local server but on the shared hosting they do not.
I tried all the solutions found on the forum but still I have the same problem.
I think the problem is at the session domain setting because when I change the value from null to other string on my local server, I have the same problem that I have encountered online.
Can you help me, please!
Thanks, Mirel
I fixed the problem. In my case the error because I have added a php closed tag ?> in the end of the included files. So removing this tag will bring the application back to normal behavior.
Now I wish to build a login function with Wykop.pl API.
Can anybody help me to setup the thing?
As of now, I don't even have clue how to fill the
'scope' => array()
not to mention which privileges I should enable when connecting my app to wykop.pl
'Wykop' => array(
'client_id' => '423423',
'client_secret' => '0XMRI423423BfDFG',
'redirect_url' => 'http://www.appname.pl/dashboard',
'scope' => array('login', 'klucz_polaczenia','profile'),
),
This is a SDK for the site https://github.com/p1c2u/wykop-sdk
Unfortunately, as for now I am unable to translate the code into sth useful to me.
For the purpose of o-auth login, should scope include 'login' and 'klucz_polaczenia' ?
After the function is done, it would be a good idea to add the example to
this project repository of examples:
https://github.com/Lusitanian/PHPoAuthLib/tree/master/examples
Edit:
Wykop is not using o-auth... so the package I was trying to use is of no value.
Any help appreciated.
Edit 2:
The clostest I got to my goal is using this repo:
https://github.com/matiit/wkop
I did this recently. I'm using following workflow:
Display the login form to the user, with redirect set to callback.
Check the signature of callback, if correct then proceed.
Check, if I can login on Wykop.pl with received token, if so, then proceed.
Check, if user exists in my database, if so, I login him, if not, I create and login him.
Whole process of connecting with Wykop.pl API is available here: http://www.wykop.pl/dla-programistow/dokumentacja/#info6_7_5
I'm trying to get mailchimp integrated with my ruby-on-rails app using the Gibbon gem.
I've successfully accessed the API. I tested it by getting a list of all my mailchimp lists. However, I'm running into problems with the listsubscribe method. I'm not getting any errors, it just isn't working at all.
I have the following code in the controller for the page where users sign up, after the user is made and their information can be accessed.
gb=Gibbon::API.new
gb.listSubscribe({:id => "the-id-for-list", :email_address => user.email, :update_existing => false, :double_optin => false, :send_welcome => true, :merge_vars => {'FNAME' => user.first_name, 'LNAME' => user.last_name, 'MERGE3' => user.subscription, 'MERGE4' => DateTime.now}})
It does nothing. I've tried playing around with the parameter phrasing (à la this post:How do you use the Gibbon Gem to automatically add subscribers to specific interest groups in MailChimp?) I've tried structuring it more like in this tutorial: http://www.leorodriguez.me/2011/08/subscribe-member-into-mailchimp-using.html
I have no idea what's going wrong. As I said before, other API calls are going through to MailChimp. Do you have any suggestions? Thank you in advance.
It turns out I had the code in the wrong place. I was not putting it where users were actually being created, but in the code to generate the view to ask users to sign up. Once I moved it to where the user was actually created, it worked fine.